multiple plots in matplotlib

...it worked great. I closed the plot...and tried it again.

    > Here is what happened:

    .... snip ....
    > line 121, in show self.window.deiconify() File
    > "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 1412, in
    > wm_deiconify return self.tk.call('wm', 'deiconify', self._w)
    > _tkinter.TclError: can't invoke "wm" command: application has
    > been destroyed
    >>>>

    > Should i be doing something different if i want to make
    > multiple plots in interactive mode? I also tried using a
    > figure(i) command before the plot command...this works
    > fine...unless i try to reuse a previously closed i-th figure.

Several people have experienced problems along these lines, and we're
working on a fix. This was the first release of the Tk backend so
please keep us up to date on other problems you find. Using the "close"
command instead of clicking the x to close the window should work

from matplotlib.matlab import *
plot([1,2,3])
close()
plot([1,2,3])

Or you can use multiple figures at the same time with the figure
command

from matplotlib.matlab import *
figure(1)
plot([1,2,3])
figure(2)
plot([1,2,3])
close(2)
xlabel('time') # figure 1 is active

Thanks,
JDH