diplomat.utils.colormaps.to_colormap
- diplomat.utils.colormaps.to_colormap(cmap: Union[None, str, list, Colormap] = None) Colormap[source]
Convert any colormap like object to a matplotlib Colormap.
- Parameters:
cmap – The colormap-like object, can be a list of colors, the name of a matplotlib colormap, a matplotlib colormap, or None. None indicates that the default matplotlib colormap should be returned.
- Returns:
A matplotlib Colormap object.