SaltyCrane Blog — Notes on JavaScript and web development

How to draw an arrow with matplotlib and python

Here is an example of how to draw an arrow with matplotlib. It should be
very easy, but I had to change the width setting so the arrow head would
not be too small. Further documentation is here:
http://matplotlib.sourceforge.net/matplotlib.pylab.html#-arrow

""" arrow_ex.py
"""
from pylab import *
figure()
axes()
arrow(.1,.1,.2,.2, width=0.01)
show()

Comments