matplotlib.pyplot.
register_cmap
(name=None, cmap=None, data=None, lut=None)¶Add a colormap to the set recognized by get_cmap()
.
It can be used in two ways:
register_cmap(name='swirly', cmap=swirly_cmap)
register_cmap(name='choppy', data=choppydata, lut=128)
In the first case, cmap must be a matplotlib.colors.Colormap
instance. The name is optional; if absent, the name will
be the name
attribute of the cmap.
In the second case, the three arguments are passed to
the LinearSegmentedColormap
initializer,
and the resulting colormap is registered.
matplotlib.pyplot.register_cmap
¶