How to adjust vector length in quiver plot?
This is the program I am using: fig, ax = plt.subplots(figsize=(4, 4)) t, dt = np.linspace(-4, 4, 10, retstep=True) x = t y = t**3 - 9*t xy = np.stack((x, y), axis=1) n = len(xy) d1ydx1 = np.apply_along_axis(np.gradient, axis=0, arr=xy) ######################## # Normalize all tangents ######################## f = lambda m : m / np.linalg.norm(m) T = np.apply_along_axis(f, axis=1, arr=d1ydx1) for idx in range(n): ax.quiver(xy[idx][0],xy[idx][1],T[idx][0],T[idx][1], color="green") plt.show() The image plotted is: I would like to modify the length of the vectors shown, because I find them too sm
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.