Possible bug in axvline

axvline does not appear to work correctly. It appears to change the plot axes.

For example:

import matplotlib
import pylab as PLT

x

array([ 0., 1., 2., 3.])

y

array([ 2., 3., 5., 6.])

PLT.plot(x,y)

[<matplotlib.lines.Line2D instance at 0x51aa828>]

PLT.axis([0.0,3.0,0.0,5.0])

[0.0, 3.0, 0.0, 5.0]

PLT.axvline(1.5)

<matplotlib.lines.Line2D instance at 0x51c1300>

PLT.axis()

[0.0, 3.0, 0.0, 6.0]

***NOTE changed plot axes!

matplotlib.__version__

'0.87.2'

The call to axvline changes the axis values. Seems to me it should not do that.

-Tony

ยทยทยท

--
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory, Fax > (818) 393-5115
  California Institute of Technology, Email > Tony.Mannucci@...369...
  4800 Oak Grove Drive, http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

axvline does not appear to work correctly. It appears to

    > change the plot axes. For example:

Thanks for the bug-report and example code, this is now fixed in svn
2481. To fix this, I also added support for selective autoscaling in
ax.autoscale_view and ax.plot, so you can say

  ax.autoscale_view(scaley=False)

or

  ax.plot(something, scaley=False)

JDH