serpentTools.utils.plot.normalizerFactory¶
-
serpentTools.utils.plot.
normalizerFactory
(data, norm, logScale, xticks, yticks)¶ Construct and return a
Normalize
for this data- Parameters
data (
numpy.ndarray
) – Data to be plotted and normalizednorm (None or callable or
matplotlib.colors.Normalize
) – If aNormalize
object, then use this as the normalizer. If callable, set the normalizer withnorm(data, xticks, yticks)
. If not None, set the normalizer to be based on the min and max of the datalogScale (bool) – If this evaluates to true, construct a
matplotlib.colors.LogNorm
with the minimum set to be the minimum of the positive values.xticks (
numpy.ndarray
) –yticks (
numpy.ndarray
) – Arrays ideally corresponding to the data. Used with callable norm function.
- Returns
or object – Object used to normalize colormaps against these data