Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-17 Thread Alain Francés
to have a memory leakage (see branch discussion with David). Fabrice Silva-2 wrote: > > Le vendredi 17 juin 2011 à 03:49 -0700, Alain Francés a écrit : >> > You can in fact remove the fig argument of the plot_density function as >> > it is not used. The clf command rem

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-17 Thread Alain Francés
igure(figsize=(8,6)) image = None for i,t in enumerate(times): psi_Na = np.sin(k*X-omega*t) image = plot_density('wavefunction',i,t,psi_Na, image) print i del image, fig plt.close() # EOF Fabrice Silva-2 wrote: > > Le vendredi 17 juin 2011

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-17 Thread Alain Francés
object and don't switch it it is not necessary to pass the object to the plot method - it remains active anyway." Fabrice Silva-2 wrote: > > Le jeudi 16 juin 2011 à 07:47 -0700, Alain Francés a écrit : >> Hi Jakob, >> >> yes your solution works and is more

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-16 Thread Alain Francés
t; method. Within the method set the figure active (pl.figure(fig.number)), > plot the data, save the figure and clear the figure canvas (pl.clf() > should work here, I guess). > Well, as mentioned I'm not sure but you could give it a try. > > br > Jakob > > Alain

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-16 Thread Alain Francés
better Agg if you are not showing the figures. If it is not the case, > more expert and wiser people will have to come to help. > > > On Thu, Jun 16, 2011 at 11:41 AM, Alain Francés > wrote: >> >> Hi, http://old.nabble.com/file/p31858795/ErrorMsg.png >> >> indee

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-16 Thread Alain Francés
Hi, http://old.nabble.com/file/p31858795/ErrorMsg.png indeed I forgot to remove these line from previous tests, sorry. However it doesn't affect the code behaviour, the problem remains (it fills the RAM memory and raises a memory error, see img in att.). Alain Davidmh wrote: > > You are im