【发布时间】:2017-06-26 14:51:30
【问题描述】:
我正在尝试使用来自matplotlib 的quiver 绘制向量 (3,2) 和 (4,-1)。但是,下面的代码
import matplotlib.pyplot as plt
X = (0, 0)
Y = (0, 0)
U = (3, 4)
V = (2, -1)
fig, ax = plt.subplots()
ax.quiver( X, Y, U, V, angles='xy', scale_units='xy', scale=1 )
ax.set_xlim( [ -5, 5 ] )
ax.set_ylim( [ -5, 5 ] )
plt.show()
(4,-1) 向量被绘制为 (-4,-1),但 (3,2) 向量是正确的。发生了什么,如何解决?
【问题讨论】:
标签: python matplotlib