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

Class HourLocator

lib/matplotlib/dates.py:1583–1605  ·  view source on GitHub ↗

Make ticks on occurrences of each hour.

Source from the content-addressed store, hash-verified

1581
1582
1583class HourLocator(RRuleLocator):
1584 """
1585 Make ticks on occurrences of each hour.
1586 """
1587 def __init__(self, byhour=None, interval=1, tz=None):
1588 """
1589 Parameters
1590 ----------
1591 byhour : int or list of int, default: all hours
1592 Ticks will be placed on every hour in *byhour*. Default is
1593 ``byhour=range(24)``, i.e., every hour.
1594 interval : int, default: 1
1595 The interval between each iteration. For example, if
1596 ``interval=2``, mark every second occurrence.
1597 tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1598 Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1599 """
1600 if byhour is None:
1601 byhour = range(24)
1602
1603 rule = rrulewrapper(HOURLY, byhour=byhour, interval=interval,
1604 byminute=0, bysecond=0)
1605 super().__init__(rule, tz=tz)
1606
1607
1608class MinuteLocator(RRuleLocator):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…