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 > 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 > <http://tug.org/pipermail/pdftex/2010-May/thread.html#8398>, and this > is exactly was causes the error too: The PNG declares an absurd > 0.9906x0.9906 pixels per *inch*. > > The image was produced by the following code: > > ============== *snip* ============== > import matplotlib.pyplot as plt > import numpy as np > > from numpy.random import randn > > data = np.clip(randn(250, 250), -1, 1) > > plt.imsave( fname = 'test.png', arr=data ) > ============== *snap* ============== > > Cheers, > Nico > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel