On 24. feb.. 2009, at 08.11, Eric Firing wrote:

> Paul Anton Letnes wrote:
>> Hello,
>> I want to save a large number of figures to file, roughly like this:
>> import pylab
>> for i in xrange(100):
>>     pylab.plot(x[i], y[i])
>>     pylab.savefig('plot' + str(i) + '.eps')
>>     pylab.figure()
>> However, a large number of figure windows show up on screen, and   
>> eventually, the application runs out of memory and crashes. How do  
>> I  avoid these windows?
>
> Replace the pylab.figure() command with pylab.clf(), or with  
> pylab.close().
>
> Eric
>
>> Regards,
>> Paul.

Thanks, this helps a lot. Is it possible to completely eliminate the  
windows popping up? Though not very important, it is still annoying  
that windows pop up when running a script in the background.

Paul.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to