matplotlib 3.5.1

BackRef
.. admonition:: Experimental
    While we expect the API to be final, we formally mark it as
    experimental for 3.5 because we want to keep the option to still adapt
    the API for 3.6 should the need arise.

The universal registry instance is :None:None:`matplotlib.colormaps`. There should be no need for users to instantiate .ColormapRegistry themselves.

Read access uses a dict-like interface mapping names to .Colormap \s:

import matplotlib as mpl
cmap = mpl.colormaps['viridis']

Returned .Colormap \s are copies, so that their modification does not change the global definition of the colormap.

Additional colormaps can be added via .ColormapRegistry.register :

mpl.colormaps.register(my_colormap)

Container for colormaps that are known to Matplotlib by name.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.cm.ColormapRegistry

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/cm.py#101
type: <class 'abc.ABCMeta'>
Commit: