Michael Droettboom wrote: > I'm not entirely certain this is desirable behavior -- what if the user > *wants* to draw an open-yet-filled polygon? How could that be done? > (Admittedly, it couldn't be done before). It seems more general to > require the user to close polygons.
True. I don't feel strongly about this. My guess is that at least at the level of the Axes.fill method, a user would almost never want the open-yet-filled case, but I could be guessing wrong, or the "almost" qualifier could be critical. We could do automatic closing only at that level, however. Maybe the best alternative is to leave the trunk behavior as it is, and make sure the documentation is very explicit about the need to supply a closed path. This change could be added to API_CHANGES, as well as to the Axes.fill docstring. Does anyone know how Matlab, IDL, etc. handle this? Eric > > This change occurred as part of the big push to draw everything as > polycurves. If we decide to support implicit closing of polygons, we > can probably do that within the polygon patch class. > > Cheers, > Mike > > Eric Firing wrote: >> Mike, >> >> 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? >> >> Thanks. >> >> Eric >> >> ------------------------------------------------------------------------ >> >> Subject: >> Re: [Matplotlib-users] missing lines on graph with upgrade to 0.98.0 >> From: >> Bryan Fodness <[EMAIL PROTECTED]> >> Date: >> Thu, 05 Jun 2008 08:38:59 -0400 >> To: >> Eric Firing <[EMAIL PROTECTED]> >> >> To: >> Eric Firing <[EMAIL PROTECTED]> >> CC: >> Matplotlib <[EMAIL PROTECTED]> >> >> >> It seems like it does not connect the last point to the first point. >> This also happens with the matplotlib.patches Polygon. >> >> >> from pylab import fill, xlim, ylim, savefig >> x1, x2, y1, y2 = -4, 4, -4, 4 >> fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r') >> xlim(-5,5) >> ylim(-5,5) >> savefig('edge_test') >> >> >> On Thu, Jun 5, 2008 at 1:18 AM, Eric Firing <[EMAIL PROTECTED] >> <mailto:[EMAIL PROTECTED]>> 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 >> suggestions? >> >> >> Please post an illustrative script, as simple as possible. >> >> Eric >> >> >> >> >> -- >> "The game of science can accurately be described as a never-ending >> insult to human intelligence." - João Magueijo > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel