Hi,
using the attached script to generate one pdf and one png of the same
figure. I get a 800x600 pixel png which is expected for a 8x6in figure
at 100 dpi. But for the pdf I get 11.11x8.33in as determined from the
document properties dialog in acrobat reader. Looking at the file
information on a mac it reports the size as 800x600 for the pdf.
Doing some more digging it turns out acrobat reader reports a correct
size for the figure if I set dpi=72 when calling savefig. Perhaps there
is some dpi information that needs to be saved with the pdf file?
/Jörgen
import pylab,numpy
from numpy import array,arange,pi,cos,sin
figsize=(8,6)
x=arange(0,2*pi,0.1)
pylab.close("all")
pylab.figure(1,figsize=figsize)
pylab.plot(x,sin(x))
pylab.savefig("figsize-1.png")
pylab.savefig("figsize-1.pdf")
-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel