I am plotting a 5X10 matrix of vectors using pyplot.quiver :
from pylab import *
COLUMN_RESOLUTION = 10
ROW_RESOLUTION = 5
plotBorders = 2
X,Y = meshgrid(arange(COLUMN_RESOLUTION),arange(ROW_RESOLUTION)) # X,Y positions of vectors
U = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, -1.0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
V = [0, 0, 0, 0, -1.0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1.0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
lim = 10
xlim(-1*lim,lim)
ylim(-1*lim,lim)
quiver(X,Y, U, V)
show()
The resulting figure has vectors with infinite length - no matter how much I extend the axes (the parameter lim) The arrows' head is not seen :
lim = 10
lim = 100
What am I doing wrong?
Thanks!