From: Zelakiewicz, S. (Research) <zel...@cr...> - 2004-11-17 18:16:06
|
Sorry, I should have explicitly stated most of this: This is on Redhat 9.0. I built numarray and matplotlib myself. Initially the matplotlib build had problems finding the numarray headers since I have to install everything to a non-standard place (I don't have root) and simply modifying basedir in setupext.py did not work. I made some sym-links and added to an include_dir to fix that and now there are no build problems. My .matplotlibrc is identical to the one put in share/matplotlib except numerix is set to 'numarray' and set datapath to '/local/share/matplotlib' which is where all the fonts and stuff are. Thanks again, Scott. -----Original Message----- From: Stephen Walton [mailto:ste...@cs...] Sent: Wednesday, November 17, 2004 12:55 PM To: Zelakiewicz, Scott (Research) Cc: 'mat...@li...' Subject: Re: [Matplotlib-users] Simple plot command fails On Wed, 2004-11-17 at 12:44 -0500, Zelakiewicz, Scott (Research) wrote: > Any help/suggestions would be appreciated. What OS version/distribution are you running? Did you built matplotlib yourself? Any errors in the build? What is in your $HOME/.matplotlibrc file? -- Stephen Walton, Professor of Physics and Astronomy, California State University, Northridge ste...@cs... |
From: Zelakiewicz, S. (Research) <zel...@cr...> - 2004-11-17 21:29:33
|
Still no luck. I am not trying to run this interactively. Switching between TkAgg and GTKAgg does not seem to do anything. Here is the output from `python simple_plot.py --verbose-helpful` Thanks again, Scott. zelakiew@shake> python simple_plot.py --verbose-helpful matplotlib data path /local/share/matplotlib loaded rc file /home/zelakiew/.matplotlibrc matplotlib version 0.64 verbose.level helpful interactive is 0 numerix numarray 1.1.1 font search path ['/local/share/matplotlib'] loaded ttfcache file /home/zelakiew/.ttffont.cache matplotlib data path /local/share/matplotlib loaded rc file /home/zelakiew/.matplotlibrc matplotlib version 0.64 verbose.level helpful interactive is 0 backend TkAgg version 8.3 Traceback (most recent call last): File "simple_plot.py", line 17, in ? show() File "/local/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py", line 68, in show manager.show() File "/local/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py", line 284, in show self.canvas.draw() File "/local/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py", line 135, 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 draw for a in self.axes: a.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/axes.py", line 963, in draw self.xaxis.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/axis.py", line 478, in draw tick.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/axis.py", line 131, in draw if midPoint and self.gridOn: self.gridline.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/lines.py", line 234, in draw xt, yt = self._transform.numerix_x_y(x, y) ValueError: x and y must be equal length sequences -----Original Message----- From: John Hunter [mailto:jdh...@ni...] Sent: Wednesday, November 17, 2004 4:21 PM To: Zelakiewicz, Scott (Research) Cc: 'Stephen Walton'; 'mat...@li...' Subject: Re: [Matplotlib-users] Simple plot command fails To test your installation, cd into the examples dir and try running simple_plot.py from the unix shell. > cd examples > python simple_plot.py OR you can choose your backend from the shell with > python simple_plot.py -dTkAgg > python simple_plot.py -dGTKAgg If that works, almost surely you have an interactive problem that will be cleared up with the links above. If now, rerun the script with --verbose-helpful and report back. Good luck, JDH |
From: John H. <jdh...@ac...> - 2004-11-17 21:57:28
|
>>>>> "Zelakiewicz," == Zelakiewicz, Scott (Research) <zel...@cr...> writes: Scott> Still no luck. I am not trying to run this Scott> interactively. Switching between TkAgg and GTKAgg Scott> does not seem to do anything. Did you try rm -rf your old site-packages/matplotlib and your build subdirectory of the matplotlib src tree, and rebuild/install matplotlib cleanly? If that fails, it might be instructive to edit "/local/lib/python2.2/site-packages/matplotlib/lines.py", line 234, and print len(x), len(y) and seeing what the hell is going on, since the last error is if midPoint and self.gridOn: self.gridline.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/lines.py", line 234, in draw xt, yt = self._transform.numerix_x_y(x, y) ValueError: x and y must be equal length sequences Finally, I can see that this is an error arising from drawing the grid. Does it go away if you turn the grid off (axes.grid : False in rc and comment out the grid call in simple_plot). I'm grasping at straws here - my best guess is above, that you have some incompatible old matplotlib lying around. JDH |
From: Zelakiewicz, S. (Research) <zel...@cr...> - 2004-11-17 22:24:19
|
First off, thanks to everyone for the replies. I think the problem turned out to be that when you do a `python setup.py clean` it does not clean out the build directory (despite what it is saying). I manually cleaned it out, rebuilt and everything is fine. There must have been some strangeness left over from when I was trying to resolve my include_dir issues I mentioned before. Just for the record, I am having no problems building against numarray 1.1 or 1.1.1. I started to try to use numeric, but it wanted a lib for cblas that I didn't have. Before I started any of this, I deleted all old versions of numarray and matplotlib is had in site-packages. Thanks again for the help, Scott. -----Original Message----- From: John Hunter [mailto:jdh...@ni...] Sent: Wednesday, November 17, 2004 4:57 PM To: Zelakiewicz, Scott (Research) Cc: 'mat...@li...' Subject: Re: [Matplotlib-users] Simple plot command fails >>>>> "Zelakiewicz," == Zelakiewicz, Scott (Research) <zel...@cr...> writes: Scott> Still no luck. I am not trying to run this Scott> interactively. Switching between TkAgg and GTKAgg Scott> does not seem to do anything. Did you try rm -rf your old site-packages/matplotlib and your build subdirectory of the matplotlib src tree, and rebuild/install matplotlib cleanly? If that fails, it might be instructive to edit "/local/lib/python2.2/site-packages/matplotlib/lines.py", line 234, and print len(x), len(y) and seeing what the hell is going on, since the last error is if midPoint and self.gridOn: self.gridline.draw(renderer) File "/local/lib/python2.2/site-packages/matplotlib/lines.py", line 234, in draw xt, yt = self._transform.numerix_x_y(x, y) ValueError: x and y must be equal length sequences Finally, I can see that this is an error arising from drawing the grid. Does it go away if you turn the grid off (axes.grid : False in rc and comment out the grid call in simple_plot). I'm grasping at straws here - my best guess is above, that you have some incompatible old matplotlib lying around. JDH |
From: Stephen W. <ste...@cs...> - 2004-11-17 20:36:57
|
On Wed, 2004-11-17 at 13:15 -0500, Zelakiewicz, Scott (Research) wrote: > This is on Redhat 9.0. I built numarray and matplotlib myself. > > Initially the matplotlib build had problems finding the numarray headers > since I have to install everything to a non-standard place (I don't have > root) Oof. I'm afraid I can't be much help. I long ago updated all my RH9 boxes to FC1 and I also have root access on them. Can anyone else reproduce these problems? -- Stephen Walton, Professor of Physics and Astronomy, California State University, Northridge ste...@cs... |
From: John H. <jdh...@ac...> - 2004-11-17 21:21:38
|
>>>>> "Zelakiewicz," == Zelakiewicz, Scott (Research) <zel...@cr...> writes: Scott> Sorry, I should have explicitly stated most of this: Scott> This is on Redhat 9.0. I built numarray and Scott> matplotlib myself. Scott> Initially the matplotlib build had problems finding Scott> the numarray headers since I have to install Scott> everything to a non-standard place (I don't have Scott> root) and simply modifying basedir in setupext.py Scott> did not work. I made some sym-links and added to an Scott> include_dir to fix that and now there are no build Scott> problems. Scott> My .matplotlibrc is identical to the one put in Scott> share/matplotlib except numerix is set to 'numarray' Scott> and set datapath to '/local/share/matplotlib' which Scott> is where all the fonts and stuff are. If you are running interactively from the python shell, you need to make sure "interactive" is set to True in your rc file and do not use show. http://matplotlib.sourceforge.net/faq.html#SHOW Also, to work interactively, you must use either the tkagg backend or a python shell that supports threading for the GUI you are using (GTK or WX) such as ipython http://ipython.scipy.org, which has explicit support for matplotlib in the pylab mode http://matplotlib.sourceforge.net/interactive.html To test your installation, cd into the examples dir and try running simple_plot.py from the unix shell. > cd examples > python simple_plot.py OR you can choose your backend from the shell with > python simple_plot.py -dTkAgg > python simple_plot.py -dGTKAgg If that works, almost surely you have an interactive problem that will be cleared up with the links above. If now, rerun the script with --verbose-helpful and report back. Good luck, JDH |