On Mon, Jan 10, 2011 at 11:22 AM, Benjamin Root <ben.r...@ou.edu> wrote:
> On Mon, Jan 10, 2011 at 10:44 AM, Angus McMorland <amcm...@gmail.com>wrote: > >> Hi all, >> >> Can anyone tell me why an additional point at the origin is added at >> the end of each PolyCollection path, on line 593 of collections.py? >> >> xy = np.concatenate([xy, np.zeros((1,2))]) >> >> It's causing funny effects in my pcolor plots, as in the example >> included. In the 'noproblem' plots I've commented out that line. >> >> Thanks, >> >> Angus >> > > The purpose of it is to close out the polygon path, but it is doing it > regardless of whether the path was already closed or not... commenting it > out breaks a lot of other code though (like hist()). It appears that pcolor > will always close out its paths, but other codes will not. > > This might actually be related to another problem of mine... > > Ben Root > > Looks like I have it wrong. I don't fully understand it yet, but somehow everything has been "magically" working even though it shouldn't have. It is completely wrong to append (0,0) to the array because it may or may not close the path. It really should be appending the first point. Give this patch a try (I haven't fully tested it, and I suspect that the MaskedArray case might still be wrong...). Ben Root
pathcompletion.patch
Description: Binary data
------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users