|
From: Michael D. <md...@st...> - 2009-10-22 13:47:08
|
The bug was actually in the path simplification. In really degenerate cases (bravo for finding it) of paths that are completely outside of the clip region, it would create a path with a single LINETO command. This is now fixed in SVN on the branch and trunk. Mike Michael Droettboom wrote: > Jouni K. Seppänen wrote: > >> Jeff Whitaker <js...@fa...> writes: >> >> >> >>> Jouni: That test script now crashes with: >>> >>> File "/Users/jwhitaker/lib/python/matplotlib/backends/backend_pdf.py", >>> line 1214, in pathOperations >>> raise ValueError, 'Path lacks initial MOVETO' >>> ValueError: Path lacks initial MOVETO >>> >>> >> I think this confirms my suspicion that the bug is really elsewhere. A >> path in PDF needs to begin with a "m" that sets the initial point, and >> that particular Path object only consisted of one LINETO operation. Am I >> correct in thinking that this is an invalid path? >> >> > Yes -- that path should be considered invalid, though the Path class > doesn't do any verification. I'll add this. I'm surprised that it's > coming from the line class, which in general doesn't allow for > customization of the path codes. There must be something unanticipated > happening. > > Cheers, > Mike > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |