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 accepting cmap.

  • 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 and 1, respectively.

  • clip (bool, optional) – Whether to clip values falling outside of vmin and vmax.

Methods Summary

__call__(value[, clip])

Normalize data values to 0-1.


Inverse operation of __call__.