Reputation: 4810
I'm trying to plot 2 simple vectors with quiver
and I'm getting strange plot:
import numpy as np
import matplotlib.pyplot as plt
v1 = np.array(([6, 8]))
x = np.array(([6 ,0]))
plt.quiver(v1, x, angles='xy', scale_units='xy', scale=1)
plt.xlim(-1, 10)
plt.ylim(-1, 10)
plt.show()
Upvotes: 0
Views: 639
Reputation: 49998
For example:
X = [0, 0]
Y = [0, 0]
U = [6, 8]
V = [6, 0]
plt.quiver(X, Y, U, V, angles='xy', scale_units='xy', scale=1)
Output:
Upvotes: 2