Eric Firing wrote: > 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?
Here is the Matlab help text; matlab does automatically close the polygons: fill(X,Y,C) creates filled polygons from the data in X and Y with vertex color specified by C. C is a vector or matrix used as an index into the colormap. If C is a row vector, length(C) must equal size(X,2) and size(Y,2); if C is a column vector, length(C) must equal size(X,1) and size(Y,1). If necessary, fill closes the polygon by connecting the last vertex to the first. Eric ------------------------------------------------------------------------- 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