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

Class DayLocator

lib/matplotlib/dates.py:1555–1580  ·  view source on GitHub ↗

Make ticks on occurrences of each day of the month. For example, 1, 15, 30.

Source from the content-addressed store, hash-verified

1553
1554
1555class DayLocator(RRuleLocator):
1556 """
1557 Make ticks on occurrences of each day of the month. For example,
1558 1, 15, 30.
1559 """
1560 def __init__(self, bymonthday=None, interval=1, tz=None):
1561 """
1562 Parameters
1563 ----------
1564 bymonthday : int or list of int, default: all days
1565 Ticks will be placed on every day in *bymonthday*. Default is
1566 ``bymonthday=range(1, 32)``, i.e., every day of the month.
1567 interval : int, default: 1
1568 The interval between each iteration. For example, if
1569 ``interval=2``, mark every second occurrence.
1570 tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1571 Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1572 """
1573 if interval != int(interval) or interval < 1:
1574 raise ValueError("interval must be an integer greater than 0")
1575 if bymonthday is None:
1576 bymonthday = range(1, 32)
1577
1578 rule = rrulewrapper(DAILY, bymonthday=bymonthday,
1579 interval=interval, **self.hms0d)
1580 super().__init__(rule, tz=tz)
1581
1582
1583class HourLocator(RRuleLocator):

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…