8000 MaxNLocator 'steps' validation; and documentation. Closes #7578. by efiring · Pull Request #7586 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

MaxNLocator 'steps' validation; and documentation. Closes #7578. #7586

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 3 commits into from
Dec 9, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
simplify test for range of steps
  • Loading branch information
efiring committed Dec 8, 2016
commit 3d1c2937000f7dda03dacc14d0c0c28f1c96736b
2 changes: 1 addition & 1 deletion lib/matplotlib/ticker.py
616D
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ def _validate_steps(steps):
steps = np.asarray(steps)
if np.any(np.diff(steps) <= 0):
raise ValueError('steps argument must be uniformly increasing')
if np.any((steps > 10) | (steps < 1)):
if steps[-1] > 10 or steps[0] < 1:
warnings.warn('Steps argument should be a sequence of numbers\n'
'increasing from 1 to 10, inclusive. Behavior with\n'
'values outside this range is undefined, and will\n'
Expand Down
0