ColormapDatabase
- class ColormapDatabase(kwargs)[source]
Bases:
ColormapRegistryDictionary subclass used to replace the matplotlib colormap registry. See
__getitem__and__setitem__for details.- Parameters:
kwargs (dict-like) – The source dictionary.
Methods Summary
get_cmap(cmap)Return a color map specified through cmap.
register(cmap, *[, name, force])Add the colormap after validating and converting.
register_lazy(name, path, type[, is_default])Register a colormap to be loaded lazily from a file.
Methods Documentation
- get_cmap(cmap)[source]
Return a color map specified through cmap.
- Parameters:
cmap (
strorColormaporNone) –if a
Colormap, return itif a string, look it up in
mpl.colormapsif None, return the Colormap defined in
rc['image.cmap']='Fire'
- Returns:
Colormap