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…).
pathcompletion.patch (839 Bytes)
On Mon, Jan 10, 2011 at 11:22 AM, Benjamin Root <ben.root@…3203…04…> wrote:
On Mon, Jan 10, 2011 at 10:44 AM, Angus McMorland <amcmorl@…287…> wrote:
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.
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…