I've had a quick look into the problem for you, and I can't give an immediate
solution, but I'll try to get a fix in the next few days.
I can say that in the original design, the intention was that show() would be
the last line of any script. I know that John (author of virtually everything
in Matplotlib except backend_wx) has recently made some changes to allow
show() to be called more than once.
Unfortunately, the code needed to do thisis quite specific to each GUI
library, and I cannot simply port what has been done for GTK (I've just tried
something very close to the GTK implementation, and it doesn't work).
A few questions for John Hunter:
I think I need to do something like the following:
- show() must now instantiate any figures already defined and enter the the
main event loop. ShowOn needs to keep track of this.
- I need to keep track of the number of figures instantiated. I assume that
Gcf.destroy() does this.
- I need to ensure that I do not exit when the last figure is destroyed, and
therefore need to manage that I may need to create a new figure manager if
there is none.
Have I missed anything?
Eugene A. Suchkov writes:
There are some bug's I've found in two days I got started with echotag.
1) I can't make 2 plots using WX-backend sequentially
from matplotlib.matlab import *
Well, everything is OK, while building 1st graph, but then an error
Traceback (most recent call last):
File "plot.py", line 7, in ?
File "/usr/lib/python2.2/site-packages/matplotlib/matlab.py", line
723, in plot draw_if_interactive()
line 986, in draw_if_interactive current_fig =
Gcf().get_current_figwin().figure AttributeError: 'Gcf' object has no
It was tested on Linux and Windows. Versions 0.40 and 0.32
When I'm using GTK everything is OK with both graphs, but using WX is