devoured elysium
devoured elysium

Reputation: 105067

Problem with the size of the arrows on a vector field plot

I would like to know how can I make it so the arrows have a length of sqrt(2) (as their x and y coordinates have length 1). As you can see for the picture shown bellow, they seem quite small. Thanks! from pylab import * from numpy import ma

X = (0, 0, 0)
Y = (0, 1, 2)

quiver(X, Y, (1, 1, 1), (1, 1, 1))
#axis([0, 1, 0, 3])

show()

alt text http://img18.imageshack.us/img18/6971/arrowsi.png

Upvotes: 0

Views: 5769

Answers (1)

Paul
Paul

Reputation: 43620

This will produce arrows sqrt(2) in proportion to the y axis.

pylab.quiver(X,Y,(1,1,1),(1,1,1), scale=2**.5, units='y')

It was in the documentation.

Here is an example.

alt text

Upvotes: 1

Related Questions