8000 Merging V2.x into master. by jenshnielsen · Pull Request #5905 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Merging V2.x into master. #5905

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

Closed
wants to merge 6 commits into from
Closed

Merging V2.x into master. #5905

wants to merge 6 commits into from

Conversation

jenshnielsen
Copy link
Member

Im doing this in a PR since there was a conflict in test_axes

tacaswell and others added 6 commits January 24, 2016 14:47
For extreme aspect-ratio plots the auto ntick logic would decide that
no ticks will fit, leading to divide by 0 issue.

 - In ticker ensure there is always at least on bin
 - Axis do not cache the number of ticks so that if the on-screen
   aspect ratio changes the number of ticks will update correctly.
Do not let the ticks in the inset adjust based on spacing of text which
is not visible.

The issue with the inset locator seems to be that as previously
implemented the axis's estimate of how many ticks it should have was
computed once and then saved.

The way that the inset axes works (if you step through this line at a
time) is that the figure-space size of the axes follows the x/y limits
at a fixed ratio to the screen-space of the same range in the main
axes. Thus, when the inset axes is created it is 'big' in that it has
limits of [0, 1] at 6x zoom -> about half the size of the host axes and
so it concludes that it needs a whole bunch of ticks and remembers that.

One of the changes in this PR makes it so that the number of ticks is
recomputed every time, thus many fewer ticks are used when the axes is
small (even though the text is all turned off).
In the inset axes (which will not have tick labels) fix the number
of ticks instead of letting auto-ticker pick the number of ticks.
FIX: always use at least 2 ticks and recompute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0