According to the documentation page: http://matplotlib.sourceforge.net/api/pyplot_api.html the way to use the axvline is like
axvline(x=0, ymin=0, ymax=1)
However, this does not work in my computer. Nothing is drawn. Rather, simply
axvline(x=0)
without setting the ymin and ymax works.
I am not sure whether this is a bug. Or maybe I missed something subtle?
matplotlib.__version__
'0.99.1.1'
uname -a
Linux pc20172 2.6.32-41-generic #94-Ubuntu SMP Fri Jul 6 18:00:34 UTC 2012 x86_64 GNU/Linux
Edit: a minimum code to reproduce the problem.
from pylab import *
ion()
plot([1,2])
axvline(x=0.5, ymin=1, ymax=2) # No vertical line is drawn.
clf() # Clear the figure to redo the plot.
plot([1,2])
axvline(x=0.5) # Now the desired vertical line is drawn.