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

Method __init__

lib/matplotlib/dates.py:1461–1478  ·  view source on GitHub ↗

Parameters ---------- base : int, default: 1 Mark ticks every *base* years. month : int, default: 1 The month on which to place the ticks, starting from 1. Default is January. day : int, default: 1 The day on wh

(self, base=1, month=1, day=1, tz=None)

Source from the content-addressed store, hash-verified

1459 locator = YearLocator(5, month=7, day=4)
1460 """
1461 def __init__(self, base=1, month=1, day=1, tz=None):
1462 """
1463 Parameters
1464 ----------
1465 base : int, default: 1
1466 Mark ticks every *base* years.
1467 month : int, default: 1
1468 The month on which to place the ticks, starting from 1. Default is
1469 January.
1470 day : int, default: 1
1471 The day on which to place the ticks.
1472 tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1473 Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1474 """
1475 rule = rrulewrapper(YEARLY, interval=base, bymonth=month,
1476 bymonthday=day, **self.hms0d)
1477 super().__init__(rule, tz=tz)
1478 self.base = ticker._Edge_integer(base, 0)
1479
1480 def _create_rrule(self, vmin, vmax):
1481 # 'start' needs to be a multiple of the interval to create ticks on

Callers

nothing calls this directly

Calls 2

rrulewrapperClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected