Hi, I have looked had a look around but I have been unable
> to find out how to change the size (and orientation) of
> graphs when I save them as eps or png files - using savefig
> - any help or directions to help would be greatly
The flags you are looking for a re the figsize argument to the figure
command, and the orientation flag to the savefig command. Complete
I didn't write the landscape support for PS/EPS (there is none
currently for png), but I think the following incantation is what you
are looking for
from matplotlib.matlab import *
figure(num = 1, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
Create a new figure and return a handle to it
If figure(num) already exists, make it active and return the
handle to it.
figsize - width in height x inches; defaults to rc figure.figsize
dpi - resolution; defaults to rc figure.dpi
facecolor - the background color; defaults to rc figure.facecolor
edgecolor - the border color; defaults to rc figure.edgecolor
rcParams gives the default values from the .matplotlibrc file
3 >>> savefig?
Base Class: <type 'function'>
String Form: <function savefig at 0x414504fc>
Definition: savefig(*args, **kwargs)
def savefig(fname, dpi=150, facecolor='w', edgecolor='w',
Save the current figure to filename fname. dpi is the resolution
in dots per inch.
Output file types currently supported are jpeg and png and will be
deduced by the extension to fname
facecolor and edgecolor are the colors os the figure rectangle
orientation is either 'landscape' or 'portrait' - not supported on
all backends; currently only on postscript output.
Hope this helps,