On 8 Apr 2009, at 12:29 PM, Gideon Simpson wrote:

> Is there a way to save a figured at a specified size?
> -gideon

I have always specified the figure size first in the figure command:

fig_width = 5 # Default unit is inches
fig_height = 3

plt.figure(figsize=(fig_width, fig_height))
plt.plot(...)
plt.savefig(...)

As long as you don't resize the figure, this will save the figure in  
the specified size.  I don't know if there is a good way to force the  
size after the fact, but things don't always scale nicely so I find it  
best to work with the desired size figure from the start.

Michael.



------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to