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
Ticks on top axis disappear if tick size is too large (when using bbox_inches='tight') #3514
Conversation
As a quick fix, try turning clipping off on the ticks. I assume what is going on here is a round-off error is the bounding box calculations and for clipping purposes the upper ticks are deemed to be 'outside' of the bounding box and dropped. |
Nevermind, that isn't a solution... |
A solution is attached. The issue here was realization that the |
I'm trying this out (ignore my previous message about it not working) |
@astrofrog: Which backend are you using? |
Ok, this works for me, thanks @mdboom! (ignore my previous message about it not working) |
Just out of interest, will this be backported to 1.4.1? |
This will make it into the next bugfix release, yes. |
(scanlines.max_y() + 1.0), | ||
width + scanlines.max_x() + 1.0, | ||
height - scanlines.min_y() + 1.0); | ||
-1.0 - scanlines.max_x(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did the x min/max get swapped?
Do I want to ask why it looks like the origin is in the lower right with the values increasing down and to the right?
BUG : Ticks on top axis disappear if tick size is too large (when using bbox_inches='tight')
This is a bug in Matplotlib 1.4 - the following script:
produces the following output when using
bbox_inches='tight'
:When not setting
bbox_inches='tight'
, the ticks are there:Addendum: it turns out I noticed this because some of the image tests in my package were failing - however, this only caused an RMS difference of ~2 or so, so the tolerance has to be quite low to catch this!