Re: [Matplotlib-users] Re peated calls to Specgram for animation, memory leaking

2009-08-05 Thread Ryan May
On Wed, Aug 5, 2009 at 8:23 AM, John Hunter wrote: > On Wed, Aug 5, 2009 at 8:08 AM, Michael Droettboom wrote: > > Images added to an axes get added to the axes' "images" member, so you > can > > simply remove it from there. > > It may be more efficient to call im.set_array(newdata) rather than >

Re: [Matplotlib-users] Re peated calls to Specgram for animation, memory leaking

2009-08-05 Thread John Hunter
On Wed, Aug 5, 2009 at 8:08 AM, Michael Droettboom wrote: > Images added to an axes get added to the axes' "images" member, so you can > simply remove it from there. It may be more efficient to call im.set_array(newdata) rather than creating a new image each time. Eg http://matplotlib.sourceforg

Re: [Matplotlib-users] Re peated calls to Specgram for animation, memory leaking

2009-08-05 Thread Michael Droettboom
Images added to an axes get added to the axes' "images" member, so you can simply remove it from there. I've attached a modified version of your script that does this. It uses a global variable which is probably not best practice, but it should be enough to give you the idea. Cheers, Mike

[Matplotlib-users] Re peated calls to Specgram for animation, memory leaking

2009-08-04 Thread xianthax
Hello, First thanks for the great library, recently came across it and seems quite useful for what i'm doing. What i'm trying to do is create an animated specgram(). I'm feeding in audio data from a microphone at the moment, although the ultimate use is to chart data that will be input via the