MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/matplotlib/dates.py:571–585  ·  view source on GitHub ↗

Parameters ---------- fmt : str `~datetime.datetime.strftime` format string tz : str or `~datetime.tzinfo`, default: :rc:`timezone` Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. usetex : bool, default: :rc:`text.usetex`

(self, fmt, tz=None, *, usetex=None)

Source from the content-addressed store, hash-verified

569 """
570
571 def __init__(self, fmt, tz=None, *, usetex=None):
572 """
573 Parameters
574 ----------
575 fmt : str
576 `~datetime.datetime.strftime` format string
577 tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
578 Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
579 usetex : bool, default: :rc:`text.usetex`
580 To enable/disable the use of TeX's math mode for rendering the
581 results of the formatter.
582 """
583 self.tz = _get_tzinfo(tz)
584 self.fmt = fmt
585 self._usetex = mpl._val_or_rc(usetex, 'text.usetex')
586
587 def __call__(self, x, pos=0):
588 result = num2date(x, self.tz).strftime(self.fmt)

Callers

nothing calls this directly

Calls 1

_get_tzinfoFunction · 0.85

Tested by

no test coverage detected