Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Rework MaxNLocator, eliminating infinite loop; closes #6849 #6919
Conversation
efiring
added the
needs_review
label
Aug 7, 2016
efiring
added this to the
2.0 (style change major release)
milestone
Aug 7, 2016
|
Here also, the appveyor py 3.5 build failed early on; it's unrelated to this PR. |
tacaswell
commented on the diff
Aug 9, 2016
lib/matplotlib/ticker.py
| @@ -1662,6 +1662,13 @@ def set_params(self, **kwargs): | ||
| steps = list(steps) | ||
| steps.append(10) | ||
| self._steps = steps | ||
| + # Make an extended staircase within which the needed | ||
| + # step will be found. This is probably much larger | ||
| + # than necessary. | ||
| + flights = (0.1 * np.array(self._steps[:-1]), |
|
|
|
This leads to
(or the example in #6849) even though the ticker could very well just use the two ticks at the two integer values. |
tacaswell
merged commit b2a25b2
into matplotlib:master
Aug 22, 2016
tacaswell
removed the
needs_review
label
Aug 22, 2016
tacaswell
added a commit
that referenced
this pull request
Aug 22, 2016
|
|
tacaswell |
9982e40
|
|
backported to v2.x as 9982e40 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
efiring commentedAug 7, 2016
The core algorithm has been reimplemented in a more compact and understandable form than my earlier try at adding the
min_n_ticksconstraint.I replaced the images for one mplot3d test because I think the present behavior is more consistent than the earlier behavior that led to those images. In the replaced versions, all of the axes have ticks just slightly inside the limits. Based on the gallery it appears this is the intended behavior but @WeatherGod can confirm or deny this.