[PYTHON] How to set the range for x-axis

David Robinow drobinow at gmail.com
Mon Nov 9 21:27:10 CET 2009


On Mon, Nov 9, 2009 at 11:46 AM, Moses <jamuah at gmail.com> wrote:
> Hi Chris,
>
> The code is
>
> from scipy import *
> from pylab import *
>
> x = [0.5,0.6,0.7,0.8,0.9,1.0]
> y = [2,6,8,10,10,10]
>
> plot(x,y,linewidth=5.0)
> show()
>
> and not
>
> from scipy import *
> from pylab import *
>
> x1 = [0.5,0.6,0.7,0.8,0.9,1.0]
> x2 = [0,1,2,3,4,5,6,7,8,9,10]
>
> plot(x1,y01,linewidth=5.0)
> show()
>
Don't top-post
use: axis([xmin,xmax,ymin,ymax])
See the documentation for details



More information about the Python-list mailing list