@@ -617,7 +617,7 @@ def __init__(self, fmt, tz=None, *, usetex=None):
617
617
fmt : str
618
618
`~datetime.datetime.strftime` format string
619
619
tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
620
- Ticks timezone.
620
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
621
621
usetex : bool, default: :rc:`text.usetex`
622
622
To enable/disable the use of TeX's math mode for rendering the
623
623
results of the formatter.
@@ -650,7 +650,7 @@ class ConciseDateFormatter(ticker.Formatter):
650
650
Locator that this axis is using.
651
651
652
652
tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
653
- Passed to `.dates.num2date`.
653
+ Ticks timezone, passed to `.dates.num2date`.
654
654
655
655
formats : list of 6 strings, optional
656
656
Format strings for 6 levels of tick labelling: mostly years,
@@ -922,8 +922,8 @@ def __init__(self, locator, tz=None, defaultfmt='%Y-%m-%d', *,
922
922
locator : `.ticker.Locator`
923
923
Locator that this axis is using.
924
924
925
- tz : str or `~datetime.tzinfo`, optional
926
- Passed to `.dates.num2date `.
925
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
926
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz `.
927
927
928
928
defaultfmt : str
929
929
The default format to use if none of the values in ``self.scaled``
@@ -1111,12 +1111,18 @@ def __init__(self, tz=None):
1111
1111
Parameters
1112
1112
----------
1113
1113
tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1114
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1114
1115
"""
1115
1116
self .tz = _get_tzinfo (tz )
1116
1117
1117
1118
def set_tzinfo (self , tz ):
1118
1119
"""
1119
- Set timezone info. str or `~datetime.tzinfo`.
1120
+ Set timezone info.
1121
+
1122
+ Parameters
1123
+ ----------
1124
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1125
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1120
1126
"""
1121
1127
self .tz = _get_tzinfo (tz )
1122
1128
@@ -1289,7 +1295,7 @@ def __init__(self, tz=None, minticks=5, maxticks=None,
1289
1295
Parameters
1290
1296
----------
1291
1297
tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1292
- Ticks timezone.
1298
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1293
1299
minticks : int
1294
1300
The minimum number of ticks desired; controls whether ticks occur
1295
1301
yearly, monthly, etc.
@@ -1490,8 +1496,17 @@ class YearLocator(RRuleLocator):
1490
1496
"""
1491
1497
def __init__ (self , base = 1 , month = 1 , day = 1 , tz = None ):
1492
1498
"""
1493
- Mark years that are multiple of base on a given month and day
1494
- (default jan 1).
1499
+ Parameters
1500
+ ----------
1501
+ base : int, default: 1
1502
+ Mark ticks every *base* years.
1503
+ month : int, default: 1
1504
+ The month on which to place the ticks, starting from 1. Default is
1505
+ January.
1506
+ day : int, default: 1
1507
+ The day on which to place the ticks.
1508
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1509
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1495
1510
"""
1496
1511
rule = rrulewrapper (YEARLY , interval = base , bymonth = month ,
1497
1512
bymonthday = day , ** self .hms0d )
@@ -1523,11 +1538,18 @@ class MonthLocator(RRuleLocator):
1523
1538
"""
1524
1539
def __init__ (self , bymonth = None , bymonthday = 1 , interval = 1 , tz = None ):
1525
1540
"""
1526
- Mark every month in *bymonth*; *bymonth* can be an int or
1527
- sequence. Default is ``range(1, 13)``, i.e. every month.
1528
-
1529
- *interval* is the interval between each iteration. For
1530
- example, if ``interval=2``, mark every second occurrence.
1541
+ Parameters
1542
+ ----------
1543
+ bymonth : int or list of int, default: all months
1544
+ Ticks will be placed on every month in *bymonth*. Default is
1545
+ ``range(1, 13)``, i.e. every month.
1546
+ bymonthday : int, default: 1
1547
+ The day on which to place the ticks.
1548
+ interval : int, default: 1
1549
+ The interval between each iteration. For example, if
1550
+ ``interval=2``, mark every second occurrence.
1551
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1552
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1531
1553
"""
1532
1554
if bymonth is None :
1533
1555
bymonth = range (1 , 13 )
@@ -1544,15 +1566,20 @@ class WeekdayLocator(RRuleLocator):
1544
1566
1545
1567
def __init__ (self , byweekday = 1 , interval = 1 , tz = None ):
1546
1568
"""
1547
- Mark every weekday in *byweekday*; *byweekday* can be a number or
1548
- sequence.
1549
-
1550
- Elements of *byweekday* must be one of MO, TU, WE, TH, FR, SA,
1551
- SU, the constants from :mod:`dateutil.rrule`, which have been
1552
- imported into the :mod:`matplotlib.dates` namespace.
1553
-
1554
- *interval* specifies the number of weeks to skip. For example,
1555
- ``interval=2`` plots every second week.
1569
+ Parameters
1570
+ ----------
1571
+ byweekday : int or list of int, default: all days
1572
+ Ticks will be placed on every weekday in *byweekday*. Default is
1573
+ every day.
1574
+
1575
+ Elements of *byweekday* must be one of MO, TU, WE, TH, FR, SA,
1576
+ SU, the constants from :mod:`dateutil.rrule`, which have been
1577
+ imported into the :mod:`matplotlib.dates` namespace.
1578
+ interval : int, default: 1
1579
+ The interval between each iteration. For example, if
1580
+ ``interval=2``, mark every second occurrence.
1581
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1582
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1556
1583
"""
1557
1584
rule = rrulewrapper (DAILY , byweekday = byweekday ,
1558
1585
interval = interval , ** self .hms0d )
@@ -1566,9 +1593,16 @@ class DayLocator(RRuleLocator):
1566
1593
"""
1567
1594
def __init__ (self , bymonthday = None , interval = 1 , tz = None ):
1568
1595
"""
1569
- Mark every day in *bymonthday*; *bymonthday* can be an int or sequence.
1570
-
1571
- Default is to tick every day of the month: ``bymonthday=range(1, 32)``.
1596
+ Parameters
1597
+ ----------
1598
+ bymonthday : int or list of int, default: all days
1599
+ Ticks will be placed on every day in *bymonthday*. Default is
1600
+ ``bymonthday=range(1, 32)``, i.e., every day of the month.
1601
+ interval : int, default: 1
1602
+ The interval between each iteration. For example, if
1603
+ ``interval=2``, mark every second occurrence.
1604
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1605
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1572
1606
"""
1573
1607
if interval != int (interval ) or interval < 1 :
1574
1608
raise ValueError ("interval must be an integer greater than 0" )
@@ -1586,11 +1620,16 @@ class HourLocator(RRuleLocator):
1586
1620
"""
1587
1621
def __init__ (self , byhour = None , interval = 1 , tz = None ):
1588
1622
"""
1589
- Mark every hour in *byhour*; *byhour* can be an int or sequence.
1590
- Default is to tick every hour: ``byhour=range(24)``
1591
-
1592
- *interval* is the interval between each iteration. For
1593
- example, if ``interval=2``, mark every second occurrence.
1623
+ Parameters
1624
+ ----------
1625
+ byhour : int or list of int, default: all hours
1626
+ Ticks will be placed on every hour in *byhour*. Default is
1627
+ ``byhour=range(24)``, i.e., every hour.
1628
+ interval : int, default: 1
1629
+ The interval between each iteration. For example, if
1630
+ ``interval=2``, mark every second occurrence.
1631
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1632
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1594
1633
"""
1595
1634
if byhour is None :
1596
1635
byhour = range (24 )
@@ -1606,11 +1645,16 @@ class MinuteLocator(RRuleLocator):
1606
1645
"""
1607
1646
def __init__ (self , byminute = None , interval = 1 , tz = None ):
1608
1647
"""
1609
- Mark every minute in *byminute*; *byminute* can be an int or
1610
- sequence. Default is to tick every minute: ``byminute=range(60)``
1611
-
1612
- *interval* is the interval between each iteration. For
1613
- example, if ``interval=2``, mark every second occurrence.
1648
+ Parameters
1649
+ ----------
1650
+ byminute : int or list of int, default: all minutes
1651
+ Ticks will be placed on every minutes in *byminutes*. Default is
1652
+ ``byminute=range(60)``, i.e., every minute.
1653
+ interval : int, default: 1
1654
+ The interval between each iteration. For example, if
1655
+ ``interval=2``, mark every second occurrence.
1656
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1657
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1614
1658
"""
1615
1659
if byminute is None :
1616
1660
byminute = range (60 )
@@ -1626,12 +1670,16 @@ class SecondLocator(RRuleLocator):
1626
1670
"""
1627
1671
def __init__ (self , bysecond = None , interval = 1 , tz = None ):
1628
1672
"""
1629
- Mark every second in *bysecond*; *bysecond* can be an int or
1630
- sequence. Default is to tick every second: ``bysecond = range(60)``
1631
-
1632
- *interval* is the interval between each iteration. For
1633
- example, if ``interval=2``, mark every second occurrence.
1634
-
1673
+ Parameters
1674
+ ----------
1675
+ bysecond : int or list of int, default: all seconds
1676
+ Ticks will be placed on every second in *bysecond*. Default is
1677
+ ``bysecond = range(60)``, i.e., every second.
1678
+ interval : int, default: 1
1679
+ The interval between each iteration. For example, if
1680
+ ``interval=2``, mark every second occurrence.
1681
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1682
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1635
1683
"""
1636
1684
if bysecond is None :
1637
1685
bysecond = range (60 )
@@ -1664,9 +1712,13 @@ class MicrosecondLocator(DateLocator):
1664
1712
"""
1665
1713
def __init__ (self , interval = 1 , tz = None ):
1666
1714
"""
1667
- *interval* is the interval between each iteration. For
1668
- example, if ``interval=2``, mark every second microsecond.
1669
-
1715
+ Parameters
1716
+ ----------
1717
+ interval : int, default: 1
1718
+ The interval between each iteration. For example, if
1719
+ ``interval=2``, mark every second occurrence.
1720
+ tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
1721
+ Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.
1670
1722
"""
1671
1723
super ().__init__ (tz = tz )
1672
1724
self ._interval = interval
0 commit comments