I can't seem to get multiple plots to draw on the same figure under TkAgg.
In the below example, the cos() doesn't show up, and the tan produces an
error. This seems to be repeatable for arbitrary cases of trying to plot
2 or 3 lines together on the one plot.
Cheers and thanks for matplotlib,
Matthew.
$ python
Python 2.2.2 (#1, Feb 24 2003, 19:13:11)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from matplotlib.matlab import *
xx = arange(0, 3, 0.1)
plot(sin(xx))
[<matplotlib.lines.Line2D instance at 0x819613c>]
plot(cos(xx))
[<matplotlib.lines.Line2D instance at 0x8636444>]
plot(tan(xx))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/site-packages/matplotlib/matlab.py", line 788,
in plot
draw_if_interactive()
File
"/usr/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py",
line 46, in draw_if_interactive
figManager.show()
File
"/usr/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py",
line 127, in show
self.canvas.draw()
File
"/usr/lib/python2.2/site-packages/matplotlib/backends/backend_agg.py",
line 334, in draw
self.figure.draw(self.renderer)
File "/usr/lib/python2.2/site-packages/matplotlib/artist.py", line 79,
in draw self._draw(renderer, *args, **kwargs)
File "/usr/lib/python2.2/site-packages/matplotlib/figure.py", line 81,
in _draw
for a in self.axes: a.draw(renderer)
File "/usr/lib/python2.2/site-packages/matplotlib/artist.py", line 79,
in draw self._draw(renderer, *args, **kwargs)
File "/usr/lib/python2.2/site-packages/matplotlib/axes.py", line 493, in
_draw line.draw(renderer)
File "/usr/lib/python2.2/site-packages/matplotlib/artist.py", line 79,
in draw self._draw(renderer, *args, **kwargs)
File "/usr/lib/python2.2/site-packages/matplotlib/lines.py", line 177,
in _draw
gc.set_foreground(self._color)
File "/usr/lib/python2.2/site-packages/matplotlib/backend_bases.py",
line 230, in set_foreground
self._rgb = colorConverter.to_rgb(fg)
File "/usr/lib/python2.2/site-packages/matplotlib/colors.py", line 82,
in to_rgb
error_msg(msg)
NameError: global name 'error_msg' is not defined
···