I am sort of adding data points; what I'm really doing is appending data to a 
python list and setting the data in the Line object to that list. The list gets 
shortened every once in awhile to keep the amount of data from getting too 
large.

It turns out the leak is in canvas.draw(), which I call whenever I shift the 
graph in time (by changing the limits on the x axis); if I don't call 
canvas.draw() the time shift is not displayed. Simply creating a blank Axes and 
calling canvas.draw() leaks memory -- even without displaying any data or 
shifting the x axes.

Regards,

-- Russell

On Dec 11, 2010, at 1:32 PM, Friedrich Romstedt wrote:

> 2010/12/1 Russell E. Owen <ro...@uw.edu>:
>> I'm seeing a nasty memory leak in my strip chart widget using matplotlib
>> 1.0, TkAgg and Mac OS X 10.5
>> 
>> I've posted a minimal version here:
>> <http://www.astro.washington.edu/users/rowen/python/MinimalStripChartWdg.
>> py>
>> 
>> It doesn't seem to matter if I use the animation API or not (the example
>> does not).
>> 
>> Any ideas?
> 
> Hmm, you're adding points right?  I remember one time I had a similar
> timeline updating each second or so, and after 10 hr it took memory of
> the order of Gigabytes (iirc) ... and it took seconds to refresh the
> plot ... took me some time to figure it out that the plotting was the
> culprit ...
> 
> hth, fwiw,
> Friedrich


------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to