-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Assume that tickers respect view limits. #6647
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
Conversation
Tickers may return positions epsilon-outside of the view limits and we don't want to drop them.
I cannot reproduce the test_simplification failures locally -- can someone have a look? |
Looking at the markevery_linear_scales result, it seem like the svg->png conversion is a bit buggy. It appears as if the axes line is partially transparent (maybe 0.5 pixel wide, sort of thing?), so the ticks "bleed through". But if you look at the svg in eog, the axes is black, so there really shouldn't be a difference. |
Can you generate the new baseline images (and perhaps open a new issue w.r.t. the conversion)? As mentioned above the tests pass fine locally for me, so I guess I can't generate them... |
Tickers do not have to respect the view limit and are allowed to return ticks which are not visible. |
Do you have a counter-example? Can we change the specification so that tickers do have to respect the view limits? (This issue is a perfect example why such a requirement would be helpful...) |
I think that the idea here is that tickers are used in the classic autoscaling mode to determine the view limits. When called to actually get the ticks, however, I think they are called with the view limits after this autoscaling has already been done, and with the resulting view limits, so they should be able to return only the ticks that respect those limits. How all the tickers actually behave is another question. |
Actually there seems to be another point where ticks are cropped to the actual limits: https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/axis.py#L1000 |
Replaced by #7042. |
Tickers may return positions epsilon-outside of the view limits and we
don't want to drop them.
Fixes #6641.