Coverage for python/lsst/sims/maf/plots/perceptual_rainbow.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from matplotlib.colors import LinearSegmentedColormap
3def makePRCmap():
4 colors = [[135, 59, 97],
5 [143, 64, 127],
6 [143, 72, 157],
7 [135, 85, 185],
8 [121, 102, 207],
9 [103, 123, 220],
10 [84, 146, 223],
11 [69, 170, 215],
12 [59, 192, 197],
13 [60, 210, 172],
14 [71, 223, 145],
15 [93, 229, 120],
16 [124, 231, 103],
17 [161, 227, 95],
18 [198, 220, 100],
19 [233, 213, 117]]
20 mpl_colors = []
21 for color in colors:
22 mpl_colors.append(tuple([x / 255. for x in color]))
23 cmap = LinearSegmentedColormap.from_list('perceptual_rainbow', mpl_colors)
24 return cmap