On Tue, Feb 28, 2012 at 3:48 PM, Mario Fuest <mariofu...@aol.com> wrote:
> Hi there,
>
> Currently i use these commands to layout and save my figures:
>
> > figure
> > ...
> > gca.set_aspect('equal')
> > gca.autoscale(tight=True)
> > ...
> > plt.savefig('fpp.png', bbox_inches='tight', pad_inches=0)
>
> I would like to set the width of this png file, how to do that? If
> savefig() does not support setting the width, maybe I can set the width
> of my xaxis?
>
> Thanks in advance, Keba
>
>
The size of the PNG will be based on the size of your figure object. When
you create your figure, you can pass a figsize kwarg which takes a tuple of
width, height in inches (defaults to 8 x 6, I think).
fig = plt.figure(figsize=(10.0, 6.0))
I hope that helps!
Ben Root
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users