matplotlib.colors.Norm#
- class matplotlib.colors.Norm[source]#
Bases:
ABCAbstract base class for normalizations.
Subclasses include
Normalizewhich maps from a scalar to a scalar. However, this class makes no such requirement, and subclasses may support the normalization of multiple variates simultaneously, with separate normalization for each variate.- abstractmethod __call__(value, clip=None)[source]#
Normalize the data and return the normalized data.
- Parameters:
- value
Data to normalize.
- clipbool, optional
See the description of the parameter clip in
Normalize.If
None, defaults toself.clip(which defaults toFalse).
Notes
If not already initialized,
self.vminandself.vmaxare initialized usingself.autoscale_None(value).
- abstractmethod autoscale_None(A)[source]#
If vmin or vmax are not set, use the min/max of A to set them.
- abstract property clip#
Determines the behavior for mapping values outside the range
[vmin, vmax].See the clip parameter in
Normalize.
- abstract property n_components#
The number of normalized components.
This is the number of elements of the parameter to
__call__and of vmin, vmax.
- abstract property vmax#
Upper limit of the input data interval; maps to 1.
- abstract property vmin#
Lower limit of the input data interval; maps to 0.