Reputation: 21981
I have the following gridded plot, and would like to draw an arrow (shown in blue using MS paint). How can I do it through matplotlib? I do not know of any command to do it.
Upvotes: 23
Views: 14533
Reputation: 5531
import matplotlib.pyplot as plt
fg = plt.figure(1);
fg.clf();
ax = fg.add_subplot(1,1,1)
ax.annotate('', xy=(0, -0.1), xycoords='axes fraction', xytext=(1, -0.1),
arrowprops=dict(arrowstyle="<->", color='b'))
ax.grid(True)
fg.canvas.draw()
gives
Upvotes: 26