Saltycrane logo

SaltyCrane Blog

Notes on Python, Django, and web development on Ubuntu Linux

    

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

Post a comment

Required
Required, but not displayed
Optional

Format using Markdown. (No HTML.)
  • Code blocks: prefix each line by at least 4 spaces or 1 tab (and a blank line before and after)
  • Code span: surround with backticks
  • Blockquotes: prefix lines to be quoted with >
  • Links: <URL>
  • Links w/ description: [description](URL)
Created with Django | Hosted by Slicehost