DivergingNorm

class DivergingNorm(vcenter=0, vmin=None, vmax=None, fair=True, clip=None)[source]

Bases: matplotlib.colors.Normalize

Normalizer that ensures some central data value lies at the central colormap color. The default central value is 0. Can be used by passing norm='diverging' to any command accepting cmap.

Parameters
  • vcenter (float, optional) – The data value corresponding to the central position of the colormap. The default is 0.

  • vmin, vmax (float, optional) – The minimum and maximum data values.

  • fair (bool, optional) – If True (default), the speeds of the color gradations on either side of the center point are equal, but colormap colors may be omitted. If False, all colormap colors are included, but the color gradations on one side may be faster than the other side. False should be used with great care, as it may result in a misleading interpretation of your data.

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

Methods Summary

__call__(value[, clip])

Normalize data values to 0-1.

autoscale_None(z)

Get vmin and vmax, and then clip at vcenter