10000 Adjust number of ticks based on length of axis by mdboom · Pull Request #5588 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Adjust number of ticks based on length of axis #5588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Dec 14, 2015
Prev Previous commit
Next Next commit
Be explicit about kwargs
  • Loading branch information
mdboom committed Dec 10, 2015
commit 5b16906f6479155a79652acb99726ae3d35256fd
8 changes: 3 additions & 5 deletions lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ class AutoSpacedLocator(MaxNLocator):
Behaves like a MaxNLocator, except N is automatically determined
from the length of the axis.
"""
def __init__(self, *args, **kwargs):
def __init__(self, steps=None, integer=False, symmetric=False, prune=None):
"""
Keyword args:

Expand All @@ -1503,11 +1503,9 @@ def __init__(self, *args, **kwargs):
will be removed. If prune==None, no ticks will be removed.

"""
if 'nbins' in kwargs:
raise ValueError(
'AutoSpacedLocator does not take nbins as an argument')
self.set_params(**self.default_params)
self.set_params(**kwargs)
self.set_params(steps=steps, integer=integer, symmetric=symmetric,
prune=prune)

def __call__(self):
self._nbins = self.axis.get_tick_space()
Expand Down
0