Re: [Matplotlib-users] Clearing figures from memory

2012-03-24 Thread David Verelst
A while ago I had exactly the same problem. I was running a script that create a lot of figures and saved them (as .png and .eps files) for viewing later (so not using the interactive viewing feature from pyplot). If I remember well, there was also a problem with the close() statement leaving s

Re: [Matplotlib-users] Clearing figures from memory

2012-03-23 Thread Eric Firing
On 03/23/2012 08:05 AM, Albert Kottke wrote: > I am having problems clearing figures from memory. After saving the > figure, I use pyplot.close() on the figure handle and then del all of > the data and figure, as shown here: > > fig.savefig('plots/%(record_id)05i' % recording) > plt.close(fig) > >

[Matplotlib-users] Clearing figures from memory

2012-03-23 Thread Albert Kottke
I am having problems clearing figures from memory. After saving the figure, I use pyplot.close() on the figure handle and then del all of the data and figure, as shown here: fig.savefig('plots/%(record_id)05i' % recording) plt.close(fig) del accel, fourier_amp, fig, time, disp gc.collect() Despi