You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
axes limits (in old "round_numbers" mode) affected by floating point issues #5767
In [1]: plt.plot([0, .2]); plt.ylim()
Out[1]: (0.0, 0.20000000000000001)
In [2]: plt.plot([-.1, .2]); plt.ylim()
Out[2]: (-0.10000000000000001, 0.25)
Note how the upper ylim changes from 0.2 to 0.25. This behavior is even tested (indirectly) by test_axes:test_vline_limit. I intend to change this behavior in my work on #5738/#5755 so that the upper limit is actually 0.2 in both cases (basically relying on matplotlib.ticker.Base, which has been written exactly to handle this).
OK, I think I got this fixed but of course this breaks a ton of image comparison tests (because axes limits got tighter) and I had never managed to run the test suite successfully locally (even setting local_freetype=False in setup.cfg doesn't help, most image comparisons always fail). Is there a way to have e.g. travis regenerate the test images and download them? (Of course I will check visually that they make sense).
Activity
mdboom commentedon Dec 30, 2015
Yes -- I think fixing anything that comes from floating-point representation inaccuracies like this is fair game.
anntzer commentedon Dec 30, 2015
OK, I think I got this fixed but of course this breaks a ton of image comparison tests (because axes limits got tighter) and I had never managed to run the test suite successfully locally (even setting
local_freetype=Falseinsetup.cfgdoesn't help, most image comparisons always fail). Is there a way to have e.g. travis regenerate the test images and download them? (Of course I will check visually that they make sense).mdboom commentedon Dec 30, 2015
There was, but that's currently not working because I lost access to the AWS account they went to. I'm working on it, but it will be a few days...
Maybe we could work on why the tests are failing for you? I assume you've read this and installed all the dependencies etc? What platform are you on?
EDIT: I'm happy to meet you on gitter.im to work through getting the test suite to work for you...
Fix floating point issues in axes limits.
Fix floating point issues in axes limits.
Fix floating point issues in axes limits.
Fix floating point issues in axes limits.
More precise choice of axes limits.
More precise choice of axes limits.
More precise choice of axes limits.
More precise choice of axes limits.
More precise choice of axes limits.
More precise choice of axes limits.
anntzer commentedon May 11, 2016
Closed by #6192.