AutoCFDatetimeLocator

class AutoCFDatetimeLocator(maxticks=None, calendar='standard', date_unit=None, minticks=3)[source]

Bases: Locator

Determines tick locations when plotting cftime.datetime data.

Attributes Summary

real_world_calendars

Methods Summary

__call__()

Return the locations of the ticks.

compute_resolution(num1, num2, date1, date2)

Returns the resolution of the dates.

set_params([maxticks, minticks, ...])

Set the parameters for the locator.

tick_values(vmin, vmax)

Return the values of the located ticks given vmin and vmax.

Attributes Documentation

real_world_calendars = ['standard', 'gregorian', 'proleptic_gregorian', 'noleap', 'julian', 'all_leap', '365_day', '366_day', '360_day']

Methods Documentation

__call__()[source]

Return the locations of the ticks.

compute_resolution(num1, num2, date1, date2)[source]

Returns the resolution of the dates. Also updates self.calendar from date1 for consistency.

set_params(maxticks=None, minticks=None, max_display_ticks=None)[source]

Set the parameters for the locator.

tick_values(vmin, vmax)[source]

Return the values of the located ticks given vmin and vmax.

Note

To get tick locations with the vmin and vmax values defined automatically for the associated axis simply call the Locator instance:

>>> print(type(loc))
<type 'Locator'>
>>> print(loc())
[1, 2, 3, 4]