If I wanted to draw arrows instead of axis lines using one of the arrow/Arrow functions, how do I get the line/arrowhead to show up? Example below:
import matplotlib.pyplot as plt
import matplotlib.patches as pts
plt.ion()
ax = plt.axes()
ax.set(xlim=[0,1],ylim=[0,1],autoscale_on=False,clip_on=False)
ax.set(frame_on=False,xticks=[],yticks=[])
pts.Arrow(0,0,1,0,width=0.05)
plt.arrow(0,0,0,1,shape='right',lw=3,fill=True)
ax.text(1,0,'functionalization',
verticalalignment='top',
horizontalalignment='center')
ax.text(0,1,'void space/structure')
plt.draw()
pts.Arrow draws nothing, and plt.arrow draws a line but no arrowhead.
The matplotlib. patches. Rectangle class is used to rectangle patch to a plot with lower left at xy = (x, y) with specified width, height and rotation angle.
plt.arrow(0,0,0,1, shape='full', lw=3, length_includes_head=True, head_width=.01)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With