On 05/28/2010 08:04 AM, Pearu Peterson wrote: > On Fri, May 28, 2010 5:12 pm, John Hunter wrote: > >> Hey Pearu -- thanks for the report. We'll try and track down and fix >> this leak. In the interim, would an acceptable work around for you be >> to *reuse* an existing line by calling set_data on it. That way you >> wouldn't have to do the add/remove that is causing your leak. Have >> you confirmed this leak on various backends (eg Agg, PDF, PS)? > > No, I haven't but I can try it. > > Regarding reusing existing line --- I have understood that this > will work only if the length of the line data does not change.
Not so. > In my case the data grows as more data points are acquired and I have > not figured out how to make axes to set new limits after changing > the line data. lineobj = plot([0], [0])[0] ax = gca() x = np.arange(10) y = 20 * np.sin(x) lineobj.set_data(x, y) xy = np.concatenate((x[:,np.newaxis], y[:,np.newaxis]), axis=1) ax.update_datalim(xy) ax.autoscale_view() draw() Eric > > Currently I am using a work around where the axes are cleared > after every 60 seconds - this seems to keep memory usage under control. > > It seems that Mike has resolved the problem. I'll try the latest > SVN.. > > Thanks! > Pearu > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel