Alan:

The figure size determines the eventual size of the figure where it will 
be displayed.  You should set that with "figsize=(x,y)" before you 
actually plot.  Then, and very importantly, you should set the DPI for 
the medium where you are viewing the figure.  A computer display will 
probably be between 75 and 100 DPI.  Then for good print quality, you 
should specify a DPI larger than that, say 300 or 350 or for some 
purists even to 800 when you use "savefig(...)".  Then the actual number 
of pixels is determined which will give the original figure size on the 
chosen display medium.  Note that more DPI means more pixels and a 
larger file.  This didn't work for me with an earlier version of mpl and 
after I posted that here, it was fixed so you should be using the latest 
version for the above to work.

HTH and cheers,

Wayne

Alan G Isaac wrote:
> On Mon, 28 Jan 2008, Manuel Metz apparently wrote:
>   
>> fig = pylab.figure(figsize=(6,10), dpi=96)
>> [...] 
>> pylab.savefig("filename.eps", dpi=96)
>>     
>
> A couple questions.
>
> 1. The help for figure says that the dpi argument
> determines the "resolution".  Suppose I am producing
> a PNG file for screen display: what am I changing
> when I change the dpi argument (from the point of
> view of the file, and from the point of viewer of
> the person viewing the file onscreen).  More generally,
> are there standard setting recommended for onscreen
> PNG figure display?
>
> 2. EPS is a vector format, and the fig has a size.
> What role does the dpi argument play here?
>
> Thank you,
> Alan Isaac
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to