ScirisDateFormatter#

class ScirisDateFormatter(locator, formats=None, zero_formats=None, show_offset=False, show_year=True, **kwargs)[source]#

Bases: ConciseDateFormatter

An adaptation of Matplotlib’s ConciseDateFormatter with a slightly different approach to formatting dates. Specifically:

  • Years are shown below dates, rather than on the RHS

  • The day and month are always shown.

  • The cursor shows only the date, not the time

This formatter is not intended to be called directly – use sc.dateformatter() instead. It is also optimized for plotting dates, rather than times – for those, ConciseDateFormatter is better.

See sc.dateformatter() for explanation of arguments.

New in version 1.3.0.

Attributes

axis

locs

Methods

format_data_short(value)[source]#

Show year-month-day, not with hours and seconds

format_ticks(values)[source]#

Append the year to the tick label for the first label, or if the year changes. This avoids the need to use offset_text, which is difficult to control.