@@ -1161,10 +1161,11 @@ class DateLocator(ticker.Locator):
1161
1161
"""
1162
1162
hms0d = {'byhour' : 0 , 'byminute' : 0 , 'bysecond' : 0 }
1163
1163
1164
- def __init__ (self , tz = None ):
1164
+ def __init__ (self , tz = None , ** kwargs ):
1165
1165
"""
1166
1166
*tz* is a :class:`tzinfo` instance.
1167
1167
"""
1168
+ super ().__init__ (** kwargs )
1168
1169
if tz is None :
1169
1170
tz = _get_rc_timezone ()
1170
1171
self .tz = tz
@@ -1235,8 +1236,8 @@ def nonsingular(self, vmin, vmax):
1235
1236
class RRuleLocator (DateLocator ):
1236
1237
# use the dateutil rrule instance
1237
1238
1238
- def __init__ (self , o , tz = None ):
1239
- DateLocator .__init__ (self , tz )
1239
+ def __init__ (self , o , tz = None , ** kwargs ):
1240
+ super () .__init__ (tz , ** kwargs )
1240
1241
self .rule = o
1241
1242
1242
1243
def __call__ (self ):
@@ -1344,7 +1345,7 @@ class AutoDateLocator(DateLocator):
1344
1345
locations.
1345
1346
"""
1346
1347
def __init__ (self , tz = None , minticks = 5 , maxticks = None ,
1347
- interval_multiples = True ):
1348
+ interval_multiples = True , ** kwargs ):
1348
1349
"""
1349
1350
*minticks* is the minimum number of ticks desired, which is used to
1350
1351
select the type of ticking (yearly, monthly, etc.).
@@ -1391,7 +1392,7 @@ def __init__(self, tz=None, minticks=5, maxticks=None,
1391
1392
locator = AutoDateLocator()
1392
1393
locator.intervald[HOURLY] = [3] # only show every 3 hours
1393
1394
"""
1394
- DateLocator .__init__ (self , tz )
1395
+ super () .__init__ (tz , ** kwargs )
1395
1396
self ._locator = YearLocator (tz = tz )
1396
1397
self ._freq = YEARLY
1397
1398
self ._freqs = [YEARLY , MONTHLY , DAILY , HOURLY , MINUTELY ,
@@ -1586,12 +1587,12 @@ class YearLocator(DateLocator):
1586
1587
# Tick every 5 years on July 4th
1587
1588
locator = YearLocator(5, month=7, day=4)
1588
1589
"""
1589
- def __init__ (self , base = 1 , month = 1 , day = 1 , tz = None ):
1590
+ def __init__ (self , base = 1 , month = 1 , day = 1 , tz = None , ** kwargs ):
1590
1591
"""
1591
1592
Mark years that are multiple of base on a given month and day
1592
1593
(default jan 1).
1593
1594
"""
1594
- DateLocator .__init__ (self , tz )
1595
+ super () .__init__ (tz , ** kwargs )
1595
1596
self .base = ticker ._Edge_integer (base , 0 )
1596
1597
self .replaced = {'month' : month ,
1597
1598
'day' : day ,
@@ -1660,7 +1661,8 @@ class MonthLocator(RRuleLocator):
1660
1661
"""
1661
1662
Make ticks on occurrences of each month, e.g., 1, 3, 12.
1662
1663
"""
1663
- def __init__ (self , bymonth = None , bymonthday = 1 , interval = 1 , tz = None ):
1664
+ def __init__ (self , bymonth = None , bymonthday = 1 , interval = 1 , tz = None ,
1665
+ ** kwargs ):
1664
1666
"""
1665
1667
Mark every month in *bymonth*; *bymonth* can be an int or
1666
1668
sequence. Default is ``range(1,13)``, i.e. every month.
@@ -1678,15 +1680,15 @@ def __init__(self, bymonth=None, bymonthday=1, interval=1, tz=None):
1678
1680
1679
1681
rule = rrulewrapper (MONTHLY , bymonth = bymonth , bymonthday = bymonthday ,
1680
1682
interval = interval , ** self .hms0d )
1681
- RRuleLocator .__init__ (self , rule , tz )
1683
+ super () .__init__ (rule , tz , ** kwargs )
1682
1684
1683
1685
1684
1686
class WeekdayLocator (RRuleLocator ):
1685
1687
"""
1686
1688
Make ticks on occurrences of each weekday.
1687
1689
"""
1688
1690
1689
- def __init__ (self , byweekday = 1 , interval = 1 , tz = None ):
1691
+ def __init__ (self , byweekday = 1 , interval = 1 , tz = None , ** kwargs ):
1690
1692
"""
1691
1693
Mark every weekday in *byweekday*; *byweekday* can be a number or
1692
1694
sequence.
@@ -1706,15 +1708,15 @@ def __init__(self, byweekday=1, interval=1, tz=None):
1706
1708
1707
1709
rule = rrulewrapper (DAILY , byweekday = byweekday ,
1708
1710
interval = interval , ** self .hms0d )
1709
- RRuleLocator .__init__ (self , rule , tz )
1711
+ super () .__init__ (rule , tz , ** kwargs )
1710
1712
1711
1713
1712
1714
class DayLocator (RRuleLocator ):
1713
1715
"""
1714
1716
Make ticks on occurrences of each day of the month. For example,
1715
1717
1, 15, 30.
1716
1718
"""
1717
- def __init__ (self , bymonthday = None , interval = 1 , tz = None ):
1719
+ def __init__ (self , bymonthday = None , interval = 1 , tz = None , ** kwargs ):
1718
1720
"""
1719
1721
Mark every day in *bymonthday*; *bymonthday* can be an int or
1720
1722
sequence.
@@ -1733,14 +1735,14 @@ def __init__(self, bymonthday=None, interval=1, tz=None):
1733
1735
1734
1736
rule = rrulewrapper (DAILY , bymonthday = bymonthday ,
1735
1737
interval = interval , ** self .hms0d )
1736
- RRuleLocator .__init__ (self , rule , tz )
1738
+ super () .__init__ (rule , tz , ** kwargs )
1737
1739
1738
1740
1739
1741
class HourLocator (RRuleLocator ):
1740
1742
"""
1741
1743
Make ticks on occurrences of each hour.
1742
1744
"""
1743
- def __init__ (self , byhour = None , interval = 1 , tz = None ):
1745
+ def __init__ (self , byhour = None , interval = 1 , tz = None , ** kwargs ):
1744
1746
"""
1745
1747
Mark every hour in *byhour*; *byhour* can be an int or sequence.
1746
1748
Default is to tick every hour: ``byhour=range(24)``
@@ -1753,14 +1755,14 @@ def __init__(self, byhour=None, interval=1, tz=None):
1753
1755
1754
1756
rule = rrulewrapper (HOURLY , byhour = byhour , interval = interval ,
1755
1757
byminute = 0 , bysecond = 0 )
1756
- RRuleLocator .__init__ (self , rule , tz )
1758
+ super () .__init__ (rule , tz , ** kwargs )
1757
1759
1758
1760
1759
1761
class MinuteLocator (RRuleLocator ):
1760
1762
"""
1761
1763
Make ticks on occurrences of each minute.
1762
1764
"""
1763
- def __init__ (self , byminute = None , interval = 1 , tz = None ):
1765
+ def __init__ (self , byminute = None , interval = 1 , tz = None , ** kwargs ):
1764
1766
"""
1765
1767
Mark every minute in *byminute*; *byminute* can be an int or
1766
1768
sequence. Default is to tick every minute: ``byminute=range(60)``
@@ -1773,14 +1775,14 @@ def __init__(self, byminute=None, interval=1, tz=None):
1773
1775
1774
1776
rule = rrulewrapper (MINUTELY , byminute = byminute , interval = interval ,
1775
1777
bysecond = 0 )
1776
- RRuleLocator .__init__ (self , rule , tz )
1778
+ super () .__init__ (rule , tz , ** kwargs )
1777
1779
1778
1780
1779
1781
class SecondLocator (RRuleLocator ):
1780
1782
"""
1781
1783
Make ticks on occurrences of each second.
1782
1784
"""
1783
- def __init__ (self , bysecond = None , interval = 1 , tz = None ):
1785
+ def __init__ (self , bysecond = None , interval = 1 , tz = None , ** kwargs ):
1784
1786
"""
1785
1787
Mark every second in *bysecond*; *bysecond* can be an int or
1786
1788
sequence. Default is to tick every second: ``bysecond = range(60)``
@@ -1793,7 +1795,7 @@ def __init__(self, bysecond=None, interval=1, tz=None):
1793
1795
bysecond = range (60 )
1794
1796
1795
1797
rule = rrulewrapper (SECONDLY , bysecond = bysecond , interval = interval )
1796
- RRuleLocator .__init__ (self , rule , tz )
1798
+ super () .__init__ (self , rule , tz , ** kwargs )
1797
1799
1798
1800
1799
1801
class MicrosecondLocator (DateLocator ):
@@ -1815,12 +1817,13 @@ class MicrosecondLocator(DateLocator):
1815
1817
early years; using year 0001 is recommended.
1816
1818
1817
1819
"""
1818
- def __init__ (self , interval = 1 , tz = None ):
1820
+ def __init__ (self , interval = 1 , tz = None , ** kwargs ):
1819
1821
"""
1820
1822
*interval* is the interval between each iteration. For
1821
1823
example, if ``interval=2``, mark every second microsecond.
1822
1824
1823
1825
"""
1826
+ super ().__init__ (** kwargs )
1824
1827
self ._interval = interval
1825
1828
self ._wrapped_locator = ticker .MultipleLocator (interval )
1826
1829
self .tz = tz
0 commit comments