How to use matplotlib arrow or quiver with a list like the following:
#X, Y, U, V
data = np.array([[1, 2, 0.5, 1],
[2, 3, 1, 1.5],
[3, 4, 1.5, 1.75],
[4, 5, 2, 2],
[5, 6, 2.5, 2.5],
[6, 8, 3, 3],
[7, 9, 3.5, 3.5],
[8, 20, 4, 4],
[9, 2, 4, 4.5]])
X = data[:, 0]
Y = data[:, 1]
U = data[:, 2]
V = data[:, 3]
The aim is to draw arrows from (X,Y) to (U,V) in the same frame with Xlim, Ylim = (30,30).
The examples I see on the internet, use a mesh grid for quiver. Any hints?
The examples you found don't use meshgrid as a grid, but for elementwise plotting. No matter which shape the arrays have, the elements at the same positions belong together.
Next time please provide your code in a usable format.