Skip to content

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

Closed

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jun 27, 2016

Tickers may return positions epsilon-outside of the view limits and we
don't want to drop them.

Fixes #6641.

Tickers may return positions epsilon-outside of the view limits and we
don't want to drop them.
@anntzer
Copy link
Contributor Author

anntzer commented Jun 27, 2016

I cannot reproduce the test_simplification failures locally -- can someone have a look?
test_markevery_linear_scales_zoomed fails locally even though there is no visible difference in the images acoording to the test triage tool; I guess this may be due to an extra tick on the edge, in which case I'll just generate a new reference image. Here too, another pair of eyes may be helpful.

@QuLogic QuLogic added this to the 2.0 (style change major release) milestone Jun 27, 2016
@QuLogic
Copy link
Member

QuLogic commented Jun 27, 2016

They are mostly due to the tick on the edge, though curiously only for the svg tests:

  • test_simplification.test_diamond:
    clipping_diamond_svg-failed-diff
  • test_simplification.test_clipping:
    clipping_svg-failed-diff
  • test_axes.markevery_linear_scales_zoomed
    markevery_linear_scales_zoomed_svg-failed-diff

@QuLogic
Copy link
Member

QuLogic commented Jun 27, 2016

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.

@anntzer
Copy link
Contributor Author

anntzer commented Jun 27, 2016

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...

@tacaswell
Copy link
Member

Tickers do not have to respect the view limit and are allowed to return ticks which are not visible.

@anntzer
Copy link
Contributor Author

anntzer commented Jun 27, 2016

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...)

@efiring
Copy link
Member

efiring commented Jun 27, 2016

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.

@anntzer
Copy link
Contributor Author

anntzer commented Jun 27, 2016

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
Not that smart_bounds seem to be mentioned anywhere in the docs... another good thing to get rid of?

@QuLogic
Copy link
Member

QuLogic commented Sep 6, 2016

Replaced by #7042.

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.

5 participants