Hi,
I would often save figures after show() from the savefig button on the navigation toolbar. I would like to trim white spaces using something akin to bbox_inches='tight', but haven't been able to figure out how. I tried adding the following to matplotlibrc, but to no avail:
savefig.bbox_inches : tight
The error message is that savefig.bbox_inches is a bad key
Could someone let me know how to do this, if it can be done? I am using Matplotlib 1.1.0
Thanks,
Saurav
Adjust the position of your ‘axes’ rectangle, e. g.
from pylab import *
x=linspace(0,4*pi,500); y=sin(x)
plot(x,y); show()
the details will depend on the size of your labels.
···
Saurav Pathak:
I would often save figures after show() from the savefig button on the navigation toolbar. I would like to trim white spaces using something akin to bbox_inches='tight', but haven't been able to figure out how. I tried adding the following to matplotlibrc, but to no avail.
axes([0.05,0.05,0.93,0.92])
Saurav,
Currently, there is no way to do what you want in v1.1.x. However, I do think it is a reasonable feature request and you should file an issue ticket on the github website.
Cheers!
Ben Root
···
On Fri, Jul 6, 2012 at 2:36 PM, Saurav Pathak <saurav@…3949…> wrote:
Hi,
I would often save figures after show() from the savefig button on the
navigation toolbar. I would like to trim white spaces using something
akin to bbox_inches=‘tight’, but haven’t been able to figure out how. I
tried adding the following to matplotlibrc, but to no avail:
savefig.bbox_inches : tight
The error message is that savefig.bbox_inches is a bad key
Could someone let me know how to do this, if it can be done? I am using
Matplotlib 1.1.0
Thanks,
Saurav