@@ -24,6 +24,7 @@ def check_property(prop, name, **kwargs):
24
24
'size' : check_size ,
25
25
'index' : check_index ,
26
26
'coordinates' : check_coordinates ,
27
+ 'colormap' : check_colormap
27
28
}
28
29
29
30
if name in checkers :
@@ -70,12 +71,14 @@ def check_colormap(cmap):
70
71
"""
71
72
Check if cmap is one of the colorbrewer maps
72
73
"""
73
- names = set (['BrBG' , 'PiYG' , 'PRGn' , 'PuOr' , 'RdBu' , 'RdGy' , 'RdYlBu' , 'RdYlGn' , 'Spectral' , 'Blues' , 'BuGn' , 'BuPu' ,
74
- 'GnBu' , 'Greens' , 'Greys ' , 'Oranges ' , 'OrRd ' , 'PuBu ' , 'PuBuGn ' , 'PuRd ' , 'Purples ' , 'RdPu ' , 'Reds ' ,
75
- 'YlGn ' , 'YlGnBu ' , 'YlOrBr ' , 'YlOrRd ' , 'Accent ' , 'Dark2 ' ,
76
- ' Paired' , 'Pastel1' , 'Pastel2' , 'Set1' , 'Set2' , 'Set3' ])
74
+ names = set (['BrBG' , 'PiYG' , 'PRGn' , 'PuOr' , 'RdBu' , 'RdGy' , 'RdYlBu' , 'RdYlGn' , 'Spectral' ,
75
+ 'Blues ' , 'BuGn ' , 'BuPu ' , 'GnBu ' , 'Greens ' , 'Greys ' , 'Oranges ' , 'OrRd ' , 'PuBu ' ,
76
+ 'PuBuGn ' , 'PuRd ' , 'Purples ' , 'RdPu ' , 'Reds ' , 'YlGn' , 'YlGnBu' , 'YlOrBr' , 'YlOrRd ' ,
77
+ 'Accent' , 'Dark2' , ' Paired' , 'Pastel1' , 'Pastel2' , 'Set1' , 'Set2' , 'Set3' , 'Lightning ' ])
77
78
if cmap not in names :
78
79
raise Exception ("Invalid cmap '%s', must be one of %s" % (cmap , names ))
80
+ else :
81
+ return cmap
79
82
80
83
81
84
def check_size (s ):
0 commit comments