[matplotlib-devel] imsave, image size

2010-05-06 Thread Nico Schlömer
Hi, today I bumped into a weird issue when including a PNG generated by imsave into a LaTeX document via \includegraphics. pdftex's very own Taco Hoekwater then noticed that the image is actually HUGE in what the specified dimensions concern

Re: [matplotlib-devel] imsave, image size

2010-05-06 Thread Michael Droettboom
It looks like the conversion from dots-per-inch (matplotlib's internal representation) to dots-per-meter (the unit defined in the PNG standard) was bogus. This should be fixed in SVN r8298. Mike Nico Schlömer wrote: > Hi, > > today I bumped into a weird issue when including a PNG generated by

Re: [matplotlib-devel] imsave, image size

2010-05-06 Thread Ryan May
On Thu, May 6, 2010 at 1:40 PM, Michael Droettboom wrote: > It looks like the conversion from dots-per-inch (matplotlib's internal > representation) to dots-per-meter (the unit defined in the PNG standard) > was bogus.  This should be fixed in SVN r8298. Are you sure that's right? This doesn't lo

Re: [matplotlib-devel] imsave, image size

2010-05-06 Thread Michael Droettboom
You're right. Thanks for the sanity check. What's happening is that when using imsave is used, it generates a figure image with a dpi of 1 (to force 1 output pixel per input pixel), but this is sort of a hack. Let me see if I can find a way around this hack. Mike Ryan May wrote: > On Thu, M

Re: [matplotlib-devel] imsave, image size

2010-05-06 Thread Michael Droettboom
Ok, I have a better fix in SVN r8300. imsave now accepts a "dpi" kwarg (default of 100) to set the DPI metadata in the file. Mike Michael Droettboom wrote: > You're right. Thanks for the sanity check. > > What's happening is that when using imsave is used, it generates a > figure image with a