nc_time_axis.AutoCFTimeFormatter
- class nc_time_axis.AutoCFTimeFormatter(locator, calendar, time_units=None)
Automatic formatter for
cftime.datetimedata.Automatically chooses a date format based on the resolution set by the
NetCDFDateTimeLocator. If no resolution is set, a default format of"%Y-%m-%d"is used.- Parameters
- locatorNetCDFDateTimeLocator
The locator to be associated with this formatter.
- calendarstr
The calendar type of the axis, e.g.
"noleap". See thecftime.datetimedocumentation for a full list of valid calendar strings.- time_unitsstr, optional
The time units the numeric tick values represent. Note this will be deprecated in nc-time-axis version 1.5.
- Attributes
- axis
Methods
__call__(x[, pos])Return the format for tick value x at position pos.
fix_minus(s)Some classes may want to replace a hyphen for minus with the proper Unicode symbol (U+2212) for typographical correctness. This is a helper method to perform such a replacement when it is enabled via :rc:`axes.unicode_minus`.
format_data(value)Return the full string representation of the value with the position unspecified.
format_data_short(value)Return a short string version of the tick value.
format_ticks(values)Return the tick labels for all the ticks at once.
set_bounds(vmin, vmax)[Deprecated]
set_data_interval(vmin, vmax)[Deprecated]
set_locs(locs)Set the locations of the ticks.
set_view_interval(vmin, vmax)[Deprecated]
create_dummy_axis
get_offset
pick_format
set_axis
- __init__(locator, calendar, time_units=None)
Methods
__init__(locator, calendar[, time_units])create_dummy_axis(**kwargs)fix_minus(s)Some classes may want to replace a hyphen for minus with the proper Unicode symbol (U+2212) for typographical correctness. This is a helper method to perform such a replacement when it is enabled via :rc:`axes.unicode_minus`.
format_data(value)Return the full string representation of the value with the position unspecified.
format_data_short(value)Return a short string version of the tick value.
format_ticks(values)Return the tick labels for all the ticks at once.
get_offset()pick_format(resolution)set_axis(axis)set_bounds(vmin, vmax)[Deprecated]
set_data_interval(vmin, vmax)[Deprecated]
set_locs(locs)Set the locations of the ticks.
set_view_interval(vmin, vmax)[Deprecated]
Attributes
axislocslocatorThe locator associated with this formatter.