Hi all, I've noticed that when I save my figures using savefig the memory is not immediately released. For example, in pseudocode,
times = get_times() for var_id in var_list: Plotting.figure() var_values = get_values(var_id) pylab.plot(times, values) Plotting.savefig(var+'.png', dpi=150) Plotting.close() This pseudo code loops over a list of variables, gets their values, and saves a plot for each one. The variable list has hundreds of items. If I run the code like this, the memory usage grows very quickly until python crashes. If I comment out the savefig line, or shorten the list of variables, the code completes without error. Can anyone suggest how I might write this differently so that I can process the long list of variables and save the figures? Is there any way to force the program to release memory once the figures are saved? I'm using matplotlib 0.90.1 and python 2.4 on windows XP. Thank you, --Jordan Atlas ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users