SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Andrew C. <ac...@gm...> - 2008年03月28日 00:09:40
Attachments: test_case.py
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)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /