Repository navigation
Conversation
jklymak
reviewed
Feb 6, 2020
Codecov Report
@@ Coverage Diff @@
## master #16428 +/- ##
==========================================
- Coverage 80.86% 80.46% -0.40%
==========================================
Files 307 307
Lines 75749 74407 -1342
Branches 9692 9688 -4
==========================================
- Hits 61252 59875 -1377
- Misses 11959 11987 +28
- Partials 2538 2545 +7
Continue to review full report at Codecov.
|
Member
|
The issue seems to be our semi-standard confusion about who's job it is to clip out-of-range ticks: In [13]: import matplotlib.ticker as mticker
... locator = mticker.MaxNLocator(4+1, min_n_ticks=1)
... vmin, vmax = (-0.11109, 1-0.1111)
... t = locator.tick_values(vmin, vmax)
... print(t)
... print(f'total ticks {len(t)}')
... print(f'ticks in window {sum((vmin < t) * (t < vmax))}')
[-0.2 0. 0.2 0.4 0.6 0.8 1. ]
total ticks 7
ticks in window 5 |
timhoffm
reviewed
Feb 16, 2020
Contributor
Author
|
I messed my github matplotlib repo settings (and not github doesn't recognize my old branch... it says |
6 tasks
efiring
added a commit
that referenced
this pull request
Mar 2, 2020
…_doc DOC: MaxNLocator and contour/contourf doc update (replaces #16428)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
closes #12729
MaxNLocator's docs were incorrect (please see the details described in #12729).Here is a numerical experiment that I ran to determine the difference between the number of tick locations returned by
MaxNLocatorand the argumentnbins.It turns out (as was shown in the original issue) that
MaxNLocatorreturns at mostnbins+2tick locations (nbins+1intervals).Since contour/contourf uses MaxNLocator (as pointed out in the original issue) updated their docs as well.
PR Checklist