Re: [Matplotlib-users] Matplotlib 1.1.0 animation vs. contour plots

2011-11-13 Thread Daniel Hyams
It's not "official", but just idiomatic, I suppose ;) http://en.wikipedia.org/wiki/Monkey_patch http://paulirish.com/2010/duck-punching-with-jquery/ > > Is that an official term? I have done things like this before, but never had > a word for it. > > Ben Root > -- Daniel Hyams dhy...@gmail.

Re: [Matplotlib-users] Matplotlib 1.1.0 animation vs. contour plots

2011-11-13 Thread Benjamin Root
On Sunday, November 13, 2011, Daniel Hyams wrote: >> >> OK, types is a new part of the Python library for me, I'll have to go >> learn about it. It looks like you basically just subclassed the >> QuadContourSet object through a back door, by giving it the missing >> method. > > It's not a subclas

Re: [Matplotlib-users] Matplotlib 1.1.0 animation vs. contour plots

2011-11-13 Thread Daniel Hyams
> > OK, types is a new part of the Python library for me, I'll have to go > learn about it.  It looks like you basically just subclassed the > QuadContourSet object through a back door, by giving it the missing > method. It's not a subclass, it's just a "monkey patch". I personally like "duck pun

Re: [Matplotlib-users] Matplotlib 1.1.0 animation vs. contour plots

2011-11-13 Thread John Ladasky
On Sun, 2011-11-13 at 13:26 -0500, Daniel Hyams wrote: > Oops; my sentence should have read "is *not* derived from an artist". Yes, I was wondering about that. I was actually looking though the artist.py and contour.py source code when your message came in. On Sunday, November 13, 2011, Daniel

Re: [Matplotlib-users] Matplotlib 1.1.0 animation vs. contour plots

2011-11-13 Thread Daniel Hyams
Oops; my sentence should have read "is *not* derived from an artist". On Sun, Nov 13, 2011 at 1:24 PM, Benjamin Root wrote: > > > On Sunday, November 13, 2011, Daniel Hyams wrote: >> This looks like a bug in matplotlib to me; I get the same thing. >> >> The basic issue is that QuadContourSet is

Re: [Matplotlib-users] Matplotlib 1.1.0 animation vs. contour plots

2011-11-13 Thread Benjamin Root
On Sunday, November 13, 2011, Daniel Hyams wrote: > This looks like a bug in matplotlib to me; I get the same thing. > > The basic issue is that QuadContourSet is derived from an artist, and > so does not have all of the artist methods; the animation framework > depends on the things that it is an

Re: [Matplotlib-users] Matplotlib 1.1.0 animation vs. contour plots

2011-11-13 Thread Daniel Hyams
This looks like a bug in matplotlib to me; I get the same thing. The basic issue is that QuadContourSet is derived from an artist, and so does not have all of the artist methods; the animation framework depends on the things that it is animating being artists. The following monkey patch fixes it

[Matplotlib-users] Matplotlib 1.1.0 animation vs. contour plots

2011-11-13 Thread John Ladasky
In my last post I said that upgrading Numpy to 1.6.1 restored function to Matplotlib 1.1.0. Well, I spoke a bit too soon. Static contour plots appear to work fine, but they don't play nicely with the new animation methods. This animation example runs without errors. http://matplotlib.sourceforg