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

Reply via email to