quiver vector plot problem

W

wongjoekmeu

Hello All,
I am using matplotlib0.8. With the quiver function I
have tried to plot a vector. However for some reason I
do not get what I want.
I have problem with the S (according the comments a
scaling parameter) parameter. When I set it to 0 (S = 0
), I get the correct vector with correct direction,
however the arrow head is not present. When I set it to
2 (S= 2) for instance, I get a scaling which I dont
understand. The direction of my vector has changed.
This is something which I do not want. I was wondering
if this is a bug or whether it is my misunderstanding
of this scaling parameter. What I want is no scaling
(S=0) but then an arrow with an arrow head. A scaling
might be useful in the future but then I think the
direction should not changed, since a vector is
characterized by its direction. Many thanks in advance
for whoever that can help me out with this problem.
Here below you can see my python code.

Robert
------------------------------
from pylab import *

X = array([ [3] ])
Y = array([ [3] ])

print "X = ",X
print "Y = ",Y

U = array([ [1] ])
V = array([ [2] ])

print "U = ",U
print "V = ",V
grid(True)
quiver(X, Y, U, V, 2.0, color=None, width=1.0)
axis([0,6,0,6])

show()
-------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top