开发者

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

开发者 https://www.devze.com 2022-12-13 09:24 出处:网络
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!

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 py开发者_StackOverflow中文版lab 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


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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消