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
When I use Figure.autofmt_xdate (it uses rotation by default) the graph is not moved/scaled so it is cropped in the image.
I noticed this problem when I was trying to crop white border in images using bbox_inches='tight' and pad_inches=0 in Figure.savefig.
My system's info:
uname -a: Linux E04679 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
The two outputs are identical, thus one may consider that "bbox_inches='tight', pad_inches=0." options work as expected.
However, the outputs are still looks wrong, and it is primarily due to the snapping of lines.
If you turn off snapping, the output looks somewhat right (but lines get blurry).
As far as I can see, the main problem is that the snapping of lines are not properly accounted when the bbox of the figure is calculated (for the AGG backend). In other words, get_window_extent method does not care about the snapping. And I don't think it can be easily implemented. Maybe, @mdboom has a better idea, though.
My recommendation is not to use 0 for pad_inches. Instead, use small enough value, e.g., 0.01, although it may leave some extra white spaces.
When I use
Figure.autofmt_xdate
(it uses rotation by default) the graph is not moved/scaled so it is cropped in the image.I noticed this problem when I was trying to crop white border in images using
bbox_inches='tight'
andpad_inches=0
inFigure.savefig
.My system's info:
uname -a
:Linux E04679 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
matplotlibrc
The code to reproduce the bug is:
The text was updated successfully, but these errors were encountered: