from scipy.integrate import odeint from pylab import * # for plotting commands def LV_deriv(y,t,alfa): u = y[0] v= y[1] du = u*(1-v) dv = alfa*v*(u-1) return array([du, dv]) time = linspace(0.0,100.0,100000) yinit = array([1.01,1.01]) # initial values a = 2.0 for i in range(1): y = odeint(LV_deriv,yinit+i*0.1,time, args =(a,),atol=1e-13,rtol = 1e-13) figure(1) plot(time,y[:,0]) # y[:,0] is the first column of y plot(time,y[:,1]) xlabel('t') ylabel('y') figure(2) plot(y[:,0],y[:,1]) # y[:,0] is the first column of y show()