Normalizations¶
A Normalize maps data values into [0, 1] for colormap lookup — the color-axis
counterpart of a Scale. Pass one as norm= to imshow, a
colormapped scatter, or the field marks; the colorbar follows it.
norms
¶
Normalizations: map data values into [0, 1] for colormap lookup.
A Normalize (and its subclasses) is the colorbar/colormap analog of a
Scale: norm(value) returns the position in [0, 1]
a value occupies on the color axis, and norm.colorbar_ticks() locates labeled
ticks for a colorbar. Used by Axes.scatter (c=) and
Axes.imshow (norm=).
Normalize
¶
Linear normalization between vmin and vmax (clamped to [0, 1]).
vmin/vmax left None are filled from the data by autoscale.
Source code in python/pyplotrs/norms.py
autoscale
¶
Fill any unset vmin/vmax from the finite members of values.
Source code in python/pyplotrs/norms.py
LogNorm
¶
Bases: Normalize
Logarithmic normalization (positive data). Colorbar ticks fall on decades.
Source code in python/pyplotrs/norms.py
TwoSlopeNorm
¶
Bases: Normalize
Diverging normalization: vcenter maps to 0.5 with independent
slopes on each side (for asymmetric data around a meaningful midpoint).
Source code in python/pyplotrs/norms.py
BoundaryNorm
¶
Bases: Normalize
Map values into discrete bins defined by boundaries (monotone), each
bin getting an evenly-spaced color position (for stepped colorbars).
Source code in python/pyplotrs/norms.py
get
¶
Resolve a norm argument (a Normalize, the string "log",
or None) plus optional vmin/vmax into a Normalize.