Hi,
I'm a matplotlib (great package!) newbie. I decided to give the
new TkAgg interactive mode a try. I did the setup
then tried the example:
>>> from matplotlib.matlab import *
>>> plot([1,2,3])
>>> xlabel('hi mom')
...it worked great. I closed the plot...and tried it again.
Here is what happened:
floyd:/home/jbenson/python>python
Python 2.3.3 (#1, Dec 21 2003, 15:13:18)
[GCC 3.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib.matlab import *
>>> plot([1,2,3]) # This plot looked fine
Could not find requested font Times
Please set environment var TTFPATH to point to your true type fonts
(*.ttf)
Could not find Times; falling back on Vera
[<matplotlib.lines.Line2D instance at 0x42c2b20c>]
>>> plot([1,2,3])
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/site-packages/matplotlib/matlab.py", line
788, in plot
draw_if_interactive()
File
"/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_tkagg.py",
line 46, in draw_if_interactive
figManager.show()
File
"/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_tkagg.py",
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.
Thanks,
Jim
|