Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d73d7bc

Browse files
committed
Be explicit about kwargs
1 parent 44d2a61 commit d73d7bc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/matplotlib/ticker.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ class AutoSpacedLocator(MaxNLocator):
14671467
Behaves like a MaxNLocator, except N is automatically determined
14681468
from the length of the axis.
14691469
"""
1470-
def __init__(self, *args, **kwargs):
1470+
def __init__(self, steps=None, integer=False, symmetric=False, prune=None):
14711471
"""
14721472
Keyword args:
14731473
@@ -1493,11 +1493,9 @@ def __init__(self, *args, **kwargs):
14931493
will be removed. If prune==None, no ticks will be removed.
14941494
14951495
"""
1496-
if 'nbins' in kwargs:
1497-
raise ValueError(
1498-
'AutoSpacedLocator does not take nbins as an argument')
14991496
self.set_params(**self.default_params)
1500-
self.set_params(**kwargs)
1497+
self.set_params(steps=steps, integer=integer, symmetric=symmetric,
1498+
prune=prune)
15011499

15021500
def __call__(self):
15031501
self._nbins = self.axis.get_tick_space()

0 commit comments

Comments
 (0)