matplotlib 3.5.1

NotesParametersBackRef
register_cmap(name=None, cmap=None, *, override_builtin=False)

Register a new colormap to be accessed by name :

LinearSegmentedColormap('swirly', data, lut)
register_cmap(cmap=swirly_cmap)

Notes

Registering a colormap stores a reference to the colormap object which can currently be modified and inadvertently change the global colormap state. This behavior is deprecated and in Matplotlib 3.5 the registered colormap will be immutable.

Parameters

name : str, optional

The name that can be used in get_cmap or image.cmap

If absent, the name will be the ~matplotlib.colors.Colormap.name attribute of the cmap.

cmap : matplotlib.colors.Colormap

Despite being the second argument and having a default value, this is a required argument.

override_builtin : bool

Allow built-in colormaps to be overridden by a user-supplied colormap.

Please do not use this unless you are sure you need it.

Add a colormap to the set recognized by get_cmap .

Examples

See :

Back References

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

matplotlib.pyplot.set_cmap

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#199
type: <class 'function'>
Commit: