Re: [Matplotlib-users] Clipping a plot inside a polygon

2013-09-02 Thread Phil Elson
Great question. The contour set itself does not have a set_clip_path method but you can iterate over each of the contour collections and set their respective clip paths, i.e.: cs = plt.contourf(data) for collection in cs.collections: collection.set_clip_path(poly) Of course, you can use this

Re: [Matplotlib-users] ANN: matplotlib 1.3.0 released

2013-09-02 Thread Andrew Jaffe
Dear all, On 06/08/2013 16:36, Andrew Jaffe wrote: On 08/02/2013 06:53 AM, Andrew Jaffe wrote: On 01/08/2013 19:06, Michael Droettboom wrote: On behalf of a veritable army of super coders, I'm pleased to announce the release of matplotlib 1.3.0. Two issues on OSX 10.8.4. I had been

Re: [Matplotlib-users] Clipping a plot inside a polygon

2013-09-02 Thread Alex Goodman
Hi Phil, Thanks, that is more or less what I was looking for. However, I still think that generalizing this approach for other types of plotting functions that don't return artists directly would be useful. Your solution gave me another idea for doing this, which would be to iterate through all

Re: [Matplotlib-users] Clipping a plot inside a polygon

2013-09-02 Thread Alex Goodman
Actually, it seems I have partially answered my own question. Since I am calling axis('off'), I do not notice the effect of clipping the other artists since I made a call to axis('off'). Without it the spines and axes rectangle are still removed but the ticks are still visible. I suppose this is

Re: [Matplotlib-users] Clipping a plot inside a polygon

2013-09-02 Thread Alex Goodman
Actually, sorry for the triple post, but is there a reason why we can't do something like pass in the keyword arguments directly from the call to contourf when instantiating each collection? Then the keyword arguments for contourf (and ContourSet) could be used for the collections directly,