I've boiled it down to nearly nothing as a script attached to this bug report: <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=3124990&group_id=80706> it simply creates an Axis and then regularly shifts the x axis limits and calls canvas.draw() to display the change. (It also reports memory usage.) You can further simplify the script by commenting out the limes that alter the x axis limits, but then the display does not change (though matplotlib still leaks memory as long as canvas.draw is still called).
I will try ax.clear(). Thanks. -- Russell On Dec 12, 2010, at 8:08 AM, Friedrich Romstedt wrote: > 2010/12/12 Russell Owen <ro...@uw.edu>: >> Simply creating a blank Axes and calling canvas.draw() leaks memory -- even >> without displaying any data or shifting the x axes. > > Okay, as a workaround have you tried ax.clear()? > > So the example script provided by you can be boiled down further? > > I'm using ax.clear() in a layered approach very extensively and have > never noticed memory leaks with this. I'm having a Layer object which > can be fed by data, and when the data changes, it automatically will > trigger an ax.clear() in the host stack, and then everything is > redrawn. Not the fastest, but fast enough. > > 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