I'm trying to understand how plt.quiver() works. My issue is as follows:
I plot a simple vector (1,1) as such:
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure(2)
ax = fig.add_subplot(111)
ax.quiver(0,0, 1, 1, units = 'xy', scale = 1)
plt.xticks(range(-5,6))
plt.yticks(range(-5,6))
plt.grid()
I would expect the arrow to go from (0,0) to (1,1), but the result is slightly off from that:
Similarly, I try and plot an arrow for vector (0,3) and the resulting arrow seems to be for vector (0,3.5)...
My assumption is that this has something to do with the kwargs 'units', 'scale', 'angles', & 'scale_units'. I've read the docs on them but don't fully understand how they work. A sunday school explanation would be greatly appreciated!



ax.quiver((0,0), (0,0), (1,0), (1,3), units = 'xy', scale = 1)and got same result (just combined). ie a chart with 1 arrow going from 0,0 to 0,3.5(ish) and another arrow going from 0,0 to aprox 0.9,1.2