johannesring / scitools

Automatically exported from code.google.com/p/scitools
Other
0 stars 0 forks source link

quiver3 error #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running example code from documentation
Example code seems to be broken in the first place, I ran this instead:
x= y= w= linspace(-3, 3, 4)
xv, yv, wv = meshgrid(x, y, w, sparse=False)
quiver3(xv, yv, wv, xv, yv, wv)

What is the expected output? What do you see instead?
This vector field is not very interesting in the first place, but should work.
It gives:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/local/lib/python2.5/site-packages/scitools/easyviz/common.py", 
line 3963, in quiver3
    return self.quiver(*args, **kwargs)
  File "/local/lib/python2.5/site-packages/scitools/easyviz/common.py", 
line 3483, in quiver
    self._replot()
  File "/local/lib/python2.5/site-packages/scitools/easyviz/gnuplot_.py", 
line 1045, in _replot
    self._g.plot(gdata[0])
  File "/local/lib/python2.5/site-packages/Gnuplot/_Gnuplot.py", line 284, 
in plot
    self._add_to_queue(items)
  File "/local/lib/python2.5/site-packages/Gnuplot/_Gnuplot.py", line 254, 
in _add_to_queue
    self.itemlist.append(PlotItems.Data(item))
  File "/local/lib/python2.5/site-packages/Gnuplot/PlotItems.py", line 589, 
in Data
    utils.write_array(f, data)
  File "/local/lib/python2.5/site-packages/Gnuplot/utils.py", line 97, in 
write_array
    assert set.shape[0] > 0
IndexError: tuple index out of range

What version of the product are you using? On what operating system?
Code gives same error on my local machine as on uio linux station,
uio currently uses version 2.5.2 of python. The plot backend is gnuplot.

Please provide any additional information below.
At least fix the documentation, it tells me to run
v, yv, zv = meshgrid(x, y, sparse=False)…

Original issue reported on code.google.com by obti...@gmail.com on 30 Oct 2009 at 8:04

GoogleCodeExporter commented 9 years ago
The documentation also tells you that only the VTK backend can do 3D vector 
field
plots. I agree that the error message could be improved so I'll see what I can 
do
about that. AFAIK, Gnuplot now supports 3D vector field plots so maybe I'll add
support for that later. I'm not sure when I will have the time so a patch would 
be
very welcome.

Original comment by johannes...@gmail.com on 5 Nov 2009 at 8:49

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r536.

Original comment by johannes...@gmail.com on 1 Feb 2010 at 11:44