Re: [Matplotlib-users] corrupt pdf of histogram
Jouni K. Seppänen j...@iki.fi writes: I have a suggested fix for this at https://github.com/matplotlib/matplotlib/pull/817 This is now merged into the v1.1.x branch, from which the fix should propagate to the upcoming release. -- Jouni K. Seppänen http://www.iki.fi/jks -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] corrupt pdf of histogram
Benjamin Root ben.r...@ou.edu writes: sanders sand...@knmi.nl writes: If keywords fill=False and log=True, then after saving, the png looks fine but the histogram in the pdf is mixed up. Confirmed, thanks for the report. I filed this at https://github.com/matplotlib/matplotlib/issues/804 I ran into something like this with filled plots originally saved as eps files and then converted into a pdf. Didn't need log=True, though. I think that's likely a different issue. The eps output machinery in matplotlib is somewhat complicated, which it likely has to be to function well with various eps-handling software, and incorporate LaTeX-rendered equations. With all the various steps (including distilling through an external program) it's difficult to debug what goes wrong. In the original problem, it seems that the path-cropping functionality used in logarithmic plots is outputting paths that work in Agg but not in pdf or svg. It basically rewrites moveto X0,Y0 (outside plottable area) lineto X1,Y0 (outside plottable area) lineto X1,Y1 (inside) lineto X0,Y1 (inside) closepath into moveto X0,Y0' (Y0' is Y0 rewritten to be close to the area) moveto X1,Y0' lineto X1,Y1 lineto X0,Y1 closepath and the closepath operation apparently goes to the first moveto in Agg, but to the latest moveto in pdf and svg. I have a suggested fix for this at https://github.com/matplotlib/matplotlib/pull/817 -- Jouni K. Seppänen http://www.iki.fi/jks -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] corrupt pdf of histogram
On Wed, Mar 28, 2012 at 2:27 PM, Jouni K. Seppänen j...@iki.fi wrote: sanders sand...@knmi.nl writes: If keywords fill=False and log=True, then after saving, the png looks fine but the histogram in the pdf is mixed up. Confirmed, thanks for the report. I filed this at https://github.com/matplotlib/matplotlib/issues/804 I ran into something like this with filled plots originally saved as eps files and then converted into a pdf. Didn't need log=True, though. The eps files were fine, but depending on how I converted (pstopdf or ps2pdf, I forget which) it would get messed up. I will double-check my comments I made in a Makefile about this to see if it might be related. Ben Root -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] corrupt pdf of histogram
Dear all, I'm making histograms: If keywords fill=False and log=True, then after saving, the png looks fine but the histogram in the pdf is mixed up. Anyone knows about this? Bram ### Script ### import matplotlib.pyplot as plt import numpy as np data = np.random.normal(size=1000) ### correct pdf fig = plt.figure() ax = fig.add_subplot(111) ax.hist(data, fill=False, log=False) fig.savefig('plot1.pdf', format='pdf') fig.savefig('plot1.png', format='png') ### wrong pdf fig = plt.figure() ax = fig.add_subplot(111) ax.hist(data, fill=False, log=True) fig.savefig('plot2.pdf', format='pdf') fig.savefig('plot2.png', format='png') -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] corrupt pdf of histogram
sanders sand...@knmi.nl writes: If keywords fill=False and log=True, then after saving, the png looks fine but the histogram in the pdf is mixed up. Confirmed, thanks for the report. I filed this at https://github.com/matplotlib/matplotlib/issues/804 -- Jouni K. Seppänen http://www.iki.fi/jks -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users