@@ -24,6 +24,7 @@ def check_property(prop, name, **kwargs):
2424 'size' : check_size ,
2525 'index' : check_index ,
2626 'coordinates' : check_coordinates ,
27+ 'colormap' : check_colormap
2728 }
2829
2930 if name in checkers :
@@ -70,12 +71,14 @@ def check_colormap(cmap):
7071 """
7172 Check if cmap is one of the colorbrewer maps
7273 """
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 ' ])
7778 if cmap not in names :
7879 raise Exception ("Invalid cmap '%s', must be one of %s" % (cmap , names ))
80+ else :
81+ return cmap
7982
8083
8184def check_size (s ):
0 commit comments