matplotlib.colors.MultiNorm#
- classmatplotlib.colors.MultiNorm(norms,vmin=None,vmax=None,clip=None)[source]#
Bases:
NormA class which contains multiple scalar norms.
- Parameters:
- normslist of (str or
Normalize) The constituent norms. The list must have a minimum length of 1.
- vmin, vmaxNone or list of (float or None)
Limits of the constituent norms.If a list, one value is assigned to each of the constituentnorms.If None, the limits of the constituent normsare not changed.
- clipNone or list of bools, default: None
Determines the behavior for mapping values outside the range
[vmin,vmax]for the constituent norms.If a list, each value is assigned to each of the constituentnorms.If None, the behaviour of the constituent norms is not changed.
- normslist of (str or
- __call__(values,clip=None)[source]#
Normalize the data and return the normalized data.
Each component of the input is normalized via the constituent norm.
- Parameters:
- valuesarray-like
The input data, as an iterable or a structured numpy array.
If iterable, must be of length
n_components. Each element can be ascalar or array-like and is normalized through the corresponding norm.If structured array, must have
n_componentsfields. Each fieldis normalized through the corresponding norm.
- cliplist of bools or None, optional
Determines the behavior for mapping values outside the range
[vmin,vmax]. See the description of the parameterclip inNormalize.IfNone, defaults toself.clip(which defaults toFalse).
- Returns:
- tuple
Normalized input values
Notes
If not already initialized,
self.vminandself.vmaxareinitialized usingself.autoscale_None(values).
- autoscale(A)[source]#
For each constituent norm, setvmin,vmax to min, max of the correspondingcomponent inA.
- Parameters:
- Aarray-like
The input data, as an iterable or a structured numpy array.
If iterable, must be of length
n_components. Each elementis used for the limits of one constituent norm.If structured array, must have
n_componentsfields. Each fieldis used for the limits of one constituent norm.
- autoscale_None(A)[source]#
Ifvmin orvmax are not set on any constituent norm,use the min/max of the corresponding component inA to set them.
- Parameters:
- Aarray-like
The input data, as an iterable or a structured numpy array.
If iterable, must be of length
n_components. Each elementis used for the limits of one constituent norm.If structured array, must have
n_componentsfields. Each fieldis used for the limits of one constituent norm.
- propertyclip#
The clip behaviour of each constituent norm.
- inverse(values)[source]#
Map the normalized values (i.e., index in the colormap) back to data values.
- Parameters:
- valuesarray-like
The input data, as an iterable or a structured numpy array.
If iterable, must be of length
n_components. Each element can be ascalar or array-like and is mapped through the corresponding norm.If structured array, must have
n_componentsfields. Each fieldis mapped through the the corresponding norm.
- propertyvmax#
The upper limit of each constituent norm.
- propertyvmin#
The lower limit of each constituent norm.