Long story short, the highest upvoted answer to this question no longer works in Google Colab, although it used to work perfectly. What exactly has changed, and how does one fix it?
Made more explicit:
import numpy as np
import matplotlib.pyplot as plt
V = np.array([[1,1],[-2,2],[4,-7]])
origin = [0], [0] # origin point
plt.quiver(*origin, V[:,0], V[:,1], color=['r','b','g'], scale=21)
plt.show()
no longer works, since it seems the capability of using ":" has been taken out of plt.quiver. The following works, however:
import numpy as np
import matplotlib.pyplot as plt
V = np.array([[1,1],[-2,2],[4,-7]])
origin = [0], [0] # origin point
plt.quiver(*origin, V[0,0], V[0,1], color=['r'], scale=21)
plt.quiver(*origin, V[1,0], V[1,1], color=['g'], scale=21)
plt.quiver(*origin, V[2,0], V[2,1], color=['b'], scale=21)
plt.show()
will do what the old code did. How can I recover the use of ":"?