MidpointNormalize
- class mdtools.plot.MidpointNormalize(vmin=None, vmax=None, midpoint=None, clip=False)[source]
Class to define your own colorbar normalization.
Deprecated since version 0.0.0.dev0: Use
matplotlib.colors.CenteredNormormatplotlib.colors.TwoSlopeNorminstead.Renormalizing a colorbar is for instance useful when you want that a diverging colorbar is centered at zero. Just parse
norm = mdtplt.MidpointNormalize(midpoint=0.0)to the plotting function.See Colormap Normalization for more information.
Initialize the Normalization.
- Parameters:
vmin (
float, optional) – The data value that defines 0.0 in the normalization. Defaults to the min value of the dataset.vmax (
float, optional) – The data value that defines 1.0 in the normalization. Defaults to the the max value of the dataset.midpoint (
float, optional) – The data value that defines 0.5 in the normalization.clip (
bool, optional) – This argument is without use!
Methods
autoscaleSet vmin, vmax to min, max of A.
autoscale_NoneIf vmin or vmax are not set, use the min/max of A to set them.
inverseMaps the normalized value (i.e., index in the colormap) back to image data value.
process_valueHomogenize the input value for easy and efficient normalization.
scaledReturn whether vmin and vmax are both set.
Attributes
clipvmaxvmin