November 2018
Beginner to intermediate
214 pages
5h 2m
English
We can also add a key to the vectors by using the quiverkey method, and then add the return value that the quiver provides. When we insert the quiver key with the x and y values, say 1 and 9, a string called gradient and another argument saying what the default length will be inserted. We can also add a key to this. By using the quiver key method, we pass the quiver return value, as well as some coordinates in the figure coordinate system (keep in mind this is not the data coordinates), a length that refers to how long in the vector scale we would want this label to be, and a label string called gradient. Here, we can see a nice little label:
# Keyq = plt.quiver(x, y, np.gradient(phi)[1], np.gradient(phi)[0], ...
Read now
Unlock full access