calculate_levels#

cfplot.calculate_levels(field: ndarray, level_spacing: str = 'linear', levels_step: Any | None = None, verbose: bool | None = None) → tuple[ndarray, int, float][source]#

Calculate contour levels automatically from field data.

Parameters#

fieldndarray

The data field to generate levels for.

level_spacingstr

One of 'linear', 'outlier', 'inspect', 'log', 'loglike'.

levels_stepscalar or None

If given, generate levels with this step size instead of auto.

verbosebool or None

If True, print diagnostic messages.

Returns#

clevsndarray

Array of contour levels.

multint

Multiplier exponent applied (10 ** mult).

fmultfloat

Inverse multiplier (10 ** -mult).