Quiver doesn't seem to be able to handle begin passed zeros for the
vector lengths. The full error output is below. I'm running Leopard
with macpython 2.5.2 using
matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg

The following code does not work:

rx = numpy.array([0.0,0.0])
ry = numpy.array([1.0,-1.0])
ax = numpy.array([0.0,0.0])
ay = numpy.array([0.0,0.0])

quiver(rx,ry,ax,ay)
savefig("image2.png",format='png')

The same code works if any of ax or ay are nonzero.


Cheers,

Andrew Charles

-----------------------------------

Error output:

spinode: ./test_case.py
Traceback (most recent call last):
  File "./test_case.py", line 24, in <module>
    savefig("image2.png",format='png')
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/pyplot.py",
line 269, in savefig
    return fig.savefig(*args, **kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/figure.py",
line 782, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_wxagg.py",
line 101, in print_figure
    FigureCanvasAgg.print_figure(self, filename, *args, **kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/backend_bases.py",
line 1201, in print_figure
    self.figure.canvas.draw()
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_wxagg.py",
line 61, in draw
    FigureCanvasAgg.draw(self)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_agg.py",
line 358, in draw
    self.figure.draw(self.renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/figure.py",
line 624, in draw
    for a in self.axes: a.draw(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/axes.py",
line 1345, in draw
    a.draw(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/quiver.py",
line 336, in draw
    verts = self._make_verts(self.U, self.V)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-i386.egg/matplotlib/quiver.py",
line 386, in _make_verts
    length = a/(self.scale*self.width)
  File "/Library/Python/2.5/site-packages/numpy/ma/core.py", line
1679, in __div__
    return divide(self, other)
  File "/Library/Python/2.5/site-packages/numpy/ma/core.py", line 614,
in __call__
    numpy.putmask(d2, t, self.filly)

Attachment: test_case.py
Description: Binary data

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to