[Fwd: Re: [Matplotlib-users] missing lines on graph with upgrade to 0.98.0]

BTW: Here's a patch if we decide to go that way:

Index: lib/matplotlib/patches.py


--- lib/matplotlib/patches.py (revision 5401)
+++ lib/matplotlib/patches.py (working copy)
@@ -540,6 +540,8 @@
         See Patch documentation for additional kwargs
         Patch.__init__(self, **kwargs)
+ xy = np.asarray(xy, np.float_)
+ xy = np.concatenate([xy, [xy[0]]])
         self._path = Path(xy)
     __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd

Eric Firing wrote:


Brian F. has correctly pointed out a change in behavior from the maintenance branch to the trunk: in the former, the fill command does not require that the polygon be closed--that is, that the last point coincide with the first. Hence, a filled rectangle can be specified with a list of 4 points. This seems to me like desirable behavior. After a very cursory look I have not spotted any obvious place where this change occurred, but I suspect it will be immediately obvious to you.

Should the old behavior be restored?




Re: [Matplotlib-users] missing lines on graph with upgrade to 0.98.0
Bryan Fodness <bryan.fodness@...149...>
Thu, 05 Jun 2008 08:38:59 -0400
Eric Firing <efiring@...229...>

Eric Firing <efiring@...229...>
Matplotlib <Matplotlib-users@lists.sourceforge.net>

It seems like it does not connect the last point to the first point. This also happens with the matplotlib.patches Polygon.

x1, x2, y1, y2 = -4, 4, -4, 4
fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r')

On Thu, Jun 5, 2008 at 1:18 AM, Eric Firing <efiring@…229… > <mailto:efiring@…229…>> wrote:

    Bryan Fodness wrote:

        I just upgraded to 0.98.0 and recreated a few graphs. I am
        missing parts of the edges of a fill and polygon. Any

    Please post an illustrative script, as simple as possible.


"The game of science can accurately be described as a never-ending insult to human intelligence." - Jo�o Magueijo

Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA