nc_time_axis.CFTimeFormatter

class nc_time_axis.CFTimeFormatter(format, calendar)

A formatter for explicitly setting the format of a cftime.datetime axis.

Parameters
formatstr Format string that can be passed to cftime.datetime.strftime,

e.g. "%Y-%m-%d". See the Python documentation for acceptable format codes.

calendarstr

The calendar type of the axis, e.g. "noleap". See the cftime.datetime documentation for a full list of valid calendar strings.

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

set_axis

__init__(format, calendar)

Methods

__init__(format, calendar)

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()

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

axis

locs