LinearSegmentedNorm¶
-
class
LinearSegmentedNorm
(levels, vmin=None, vmax=None, clip=False)[source]¶ Bases:
matplotlib.colors.Normalize
This is the default normalizer paired with
BinNorm
wheneverlevels
are non-linearly spaced. The normalized value is linear with respect to its average index in thelevels
vector, allowing uniform color transitions across arbitrarily spaced monotonically increasing values. Can be explicitly used by passingnorm='segmented'
to any command acceptingcmap
.- Parameters
levels (list of float) – The discrete data levels.
vmin, vmax (None) – Ignored.
vmin
andvmax
are set to the minimum and maximum oflevels
.clip (bool, optional) – Whether to clip values falling outside of the minimum and maximum levels.
Methods Summary
__call__
(value[, clip])Normalize the data values to 0-1.
inverse
(value)Inverse operation of
__call__
.