plot - Matplotlib Wavy Arrow -
to reproduce wavy arrow question, may use line plot , triangle
import numpy np import matplotlib.pyplot plt import matplotlib.path mpath import matplotlib.patches mpatches fig, ax = plt.subplots() x = np.linspace(0,9*np.pi,151) y = np.sin(x) ax.plot(x,y, color="gray", lw="3") verts = np.array([[0,1],[0,-1],[2,0],[0,1]]).astype(float)*1.3 verts[:,0] += 9*np.pi path = mpath.path(verts) patch = mpatches.pathpatch(path, fc='gray', ec="gray") ax.add_patch(patch) ax.axis("off") ax.set_aspect("equal",'datalim') ax.relim() ax.autoscale_view() plt.show()
Comments
Post a Comment