MidpointNorm¶
-
class
MidpointNorm
(midpoint=0, vmin=-1, vmax=1, clip=None)[source]¶ Bases:
matplotlib.colors.Normalize
Ensures a “midpoint” always lies at the central colormap color. Can be used by passing
norm='midpoint'
to any command acceptingcmap
.- Parameters
midpoint (float, optional) – The midpoint, i.e. the data value corresponding to the position in the middle of the colormap. The default is
0
.vmin, vmax (float, optional) – The minimum and maximum data values. The defaults are
-1
and1
, respectively.clip (bool, optional) – Whether to clip values falling outside of
vmin
andvmax
.
Methods Summary
__call__
(value[, clip])Normalize data values to 0-1.
inverse
(value)Inverse operation of
__call__
.