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
frameon=False shifts plot axes to to the right and increases figure width #1586
Comments
I can't recreate this with the OS X or Qt4Agg backends. I also can't recreate it saving a png from Agg. All this is using master, which is currently at dc1d0ee. I can't recreate this with OS X or Qt4Agg backends on the current v1.2.x tip, which is currently at da2d0c4. I also can't recreate this with OS X or Qt4Agg on v1.2.0rc3. Could you provide a little more information about your backend? And perhaps add a screen shot of the behaviour you are seeing? GitHub now allows you to drag an image into the comment box to attach it. Thanks for reporting the problem, @pmacaodh. |
I'm using the pylab backend in ipython:
Hope that can help you track it down. Thanks for you efforts! |
The issue is with |
@pmacaodh Do you have the possibility to test the attached pull request? |
By the way. This code illustrates the issue: (toggling between True and False fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.plot(range(10));
ax=pylab.gca();
l = ax.legend('test', frameon=True)
plt.savefig('test.png',bbox_inches='tight')
print l.get_window_extent(fig._cachedRenderer)
print l._legend_box.get_window_extent(fig._cachedRenderer) |
@jenshnielsen I'm afraid I don't have the possibility to test the pull request - I'm not so proficient in these development tools. Thanks for your efforts. I trust the fix will appear in the main code base soon so I'll hold tight until then. |
@jenshnielsen If I am reading this thread correctly you think this if fixed. If I am incorrect please re-open. |
yes this should be fixed |
The frameon argument shifts the plot axes to the right leaving a strip of blank canvas to the left of the plot axes, while increasing the figure's width. Altogether, a highly undesirable side-effect.
I'm using 1.2.0rc3
A search for frameon in issues produced nothing describing this problem. A wider google search uncovered a couple of references to this problem but the solution still eludes me.
The text was updated successfully, but these errors were encountered: