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 normalized

  • norm (None or callable or matplotlib.colors.Normalize) – If a Normalize object, then use this as the normalizer. If callable, set the normalizer with norm(data, xticks, yticks). If not None, set the normalizer to be based on the min and max of the data

  • logScale (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