From: Zelakiewicz, S. (Research) <zel...@cr...> - 2004-11-17 17:44:50
|
Hi, I am trying to get matplotlib (0.64) up and running. When I run the following commands from matplotlib.matlab import * figure(1) plot([1,2,3,4]) show() I get an error message (shown below), the figure window draws with the buttons on the bottom, but no plot is drawn. I have tried this with the GTKAgg and TkAgg backends and they both give the same error. If it matters, I am using numarray. Any help/suggestions would be appreciated. Thanks, Scott. 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 * >>> figure(1) <matplotlib.figure.Figure instance at 0x86cea2c> >>> plot([1,2,3,4]) [<matplotlib.lines.Line2D instance at 0x87470cc>] >>> show() /local/usr/src/garnome2.6.2/lib/python2.2/site-packages/gtk-2.0/gtk/__init__ .py: 83: GtkDeprecationWarning: gtk.mainloop is deprecated, use gtk.main instead self.warn(message, DeprecationWarning) Traceback (most recent call last): File "/local/lib/python2.2/site-packages/matplotlib/backends/backend_gtkagg.py ", line 96, in callback else: self.draw() File "/local/lib/python2.2/site-packages/matplotlib/backends/backend_gtkagg.py ", line 44, in draw FigureCanvasAgg.draw(self) File "/local/lib/python2.2/site-packages/matplotlib/backends/backend_agg.py", line 310, in draw self.figure.draw(self.renderer) File "/local/lib/python2.2/site-packages/matplotlib/figure.py", line 254, in d raw for a in self.axes: a.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/axes.py", line 963, in dra w self.xaxis.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/axis.py", line 478, in dra w tick.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/axis.py", line 132, in dra w if midPoint and self.tick1On: self.tick1line.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/lines.py", line 234, in dr aw xt, yt = self._transform.numerix_x_y(x, y) ValueError: x and y must be equal length sequences |