Make ticks on occurrences of each hour.
| 1581 | |
| 1582 | |
| 1583 | class 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 | |
| 1608 | class MinuteLocator(RRuleLocator): |
no outgoing calls
no test coverage detected
searching dependent graphs…