mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle#

class mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle(nx, ny, lon_cycle=360.0, lat_cycle=None, lon_minmax=None, lat_minmax=(-90, 90))[source]#

Bases: ExtremeFinderSimple

This subclass handles the case where one or both coordinates should be taken modulo 360, or be restricted to not exceed a specific range.

Parameters:
nx, nyint

The number of samples in each direction.

lon_cycle, lat_cycle360 or None

If not None, values in the corresponding direction are taken modulo lon_cycle or lat_cycle; in theory this can be any number but the implementation actually assumes that it is 360 (if not None); other values give nonsensical results.

This is done by "unwrapping" the transformed grid coordinates so that jumps are less than a half-cycle; then normalizing the span to no more than a full cycle.

For example, if values are in the union of the [0, 2] and [358, 360] intervals (typically, angles measured modulo 360), the values in the second interval are normalized to [-2, 0] instead so that the values now cover [-2, 2]. If values are in a range of [5, 1000], this gets normalized to [5, 365].

lon_minmax, lat_minmax(float, float) or None

If not None, the computed bounding box is clipped to the given range in the corresponding direction.

Examples using mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle#

axis_direction demo

axis_direction demo

Curvilinear grid demo

Curvilinear grid demo

floating_axis demo

floating_axis demo

Simple axis pad

Simple axis pad