Skip to content
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

Edge ticks sometimes disappear #6641

Closed
EdwinChan opened this issue Jun 24, 2016 · 6 comments
Closed

Edge ticks sometimes disappear #6641

EdwinChan opened this issue Jun 24, 2016 · 6 comments
Assignees
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone

Comments

@EdwinChan
Copy link

I am using

  • matplotlib 1.5.1 installed with pip for Python 3.5.1+ on Ubuntu; and
  • matplotlib 2.0.0b1+1708.g5de9c44 built from source for Python 3.5.1 on Scientific Linux 5.8.

Consider the example

import matplotlib
from matplotlib import pyplot

pyplot.xlim(0, 1.2)
pyplot.ylim(0, 1.2)
pyplot.annotate(matplotlib.__version__, (0, 0), (0.1, 1.1), 'data', 'data',
  ha='left', va='top')
pyplot.savefig('lim.png')

With the GitHub version of matplotlib, the last tick (1.2) is missing from both axes. This is a regression because matplotlib 1.5.1 can show both ticks without problem.
lim

@jenshnielsen jenshnielsen added this to the 2.0 (style change major release) milestone Jun 25, 2016
@anntzer
Copy link
Contributor

anntzer commented Jun 27, 2016

Bisected back to #5956. I wonder if the check for interval_contains is really necessary? Can't we just rely on the ticker to only return ticks that are within the interval?

@efiring
Copy link
Member

efiring commented Jun 27, 2016

It looks like that check dates back to 2005--tickers have changed a lot since then, so yes, it seems reasonable to leave the responsibility for tick selection entirely to the tickers. It would be a good idea to check all of them to see whether they are handling floating point slop in a reasonable and consistent way.

@anntzer
Copy link
Contributor

anntzer commented Jun 27, 2016

The log-ticker seems to use a strict inequality check (e.g. there's no tick at 10 for xlim(1, nextafter(10, 0))) but that's not really a problem (or at most a separate one), right?
Also I am now not even certain that the whole dance with Base to handle floating point errors is necessary?

@efiring
Copy link
Member

efiring commented Jun 27, 2016

The Base machinery was put in explicitly for that purpose, because we were having problems, I believe; is there another mechanism that replaces it? (I didn't write Base, and haven't looked at it carefully.)

@tacaswell tacaswell added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Aug 29, 2016
@efiring
Copy link
Member

efiring commented Aug 29, 2016

#5956 has an obvious effect only on tick labels, not on whether a tick is drawn, so I don't see how it could be the cause of the change in behavior.

@efiring
Copy link
Member

efiring commented Sep 6, 2016

Closed by #7042.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

No branches or pull requests

6 participants