"batch" plots

code for some reason, but instead hangs. When I try

    > and close the plot manually, it terminates the python
    > code. How can I get matplotlib to produce a new plot
    > each time it is called, moving on after each plot is
    > produced, displayed and saved to file. Here is a
    > sample function from my code:

For the GTK backend, there is another solution. The call to
ShowOn().set(1) tells matplotlib to execute the commands as they are
issued, which was originally designed for people using matplotlib
from the python shell but also applies to your case, where you want to
generate a bunch of figures one at a time

import matplotlib
from matplotlib.matlab import *
from matplotlib.backends.backend_gtk import ShowOn

t = arange(0.0, 3.0, 0.01)
for i in range(1,10):
    s = sin(2*pi*i*t)
    savefig('plot%02d' % i)

*Note there is no call to show at the end*

The same trick *does not* currently work with the WX backend, though
perhaps Jeremy can take a look at it and determine why not. Somehow
the call the ShowOn().set(1) seems to screw it up.

We'll look into it...