plot - Matplotlib Wavy Arrow -


is there way create 'wavy' arrow in matplotlib / python please?

ideally, i'd recreate following: enter image description here

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() 

enter image description here


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -