ax.set_ylim(-1, 7)

def update_quiver(num, Q, X, Y):
    """updates the horizontal and vertical vector components by a
    fixed increment on each frame
    """
U = np.cos(X + num * 0.1)
V = np.sin(Y + num * 0.1)
Q.set_UVC(U, V)
return Q,
anim = animation.FuncAnimation(fig, update_quiver, fargs=(Q, X, Y),
    interval=10, blit=False)
plt.show()
Plotting animated quivers in Python