ColormapDatabase.__getitem__¶
- ColormapDatabase.__getitem__(key)[source]¶
Retrieve the colormap associated with the sanitized key name. The key name is case insensitive.
If the key ends in
'_r'
, the result ofcmap.reversed()
is returned for the colormap registered under the preceding name.If the key ends in
'_s'
, the result ofcmap.shifted(180)
is returned for the colormap registered under the preceding name.Reversed diverging colormaps can be requested with their “reversed” name – for example,
'BuRd'
is equivalent to'RdBu_r'
.