In [43]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from scipy.integrate import odeint
from mpl_toolkits.mplot3d import Axes3D

rho = 28.0
sigma = 10.0
beta = 8.0 / 3.0

def f(state, t):
  x, y, z = state  # unpack the state vector
  return sigma * (y - x), x * (rho - z) - y, x * y - beta * z  # derivatives

state0 = [14,
          np.sqrt(8.0*27/3),
          np.sqrt(8.0*27/3),
          ]

state0 = [6.48, 8.48, 27]

t = np.arange(0.0, 110.0, 0.1)

states = odeint(f, state0, t)

fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot(states[:,0], states[:,1], states[:,2])
plt.show()



In [44]:
states


Out[44]:
array([[  6.48      ,   8.48      ,  27.        ],
       [  7.80869133,   8.76238918,  26.13692792],
       [  8.61695771,   9.27730092,  26.58321365],
       ..., 
       [  1.00723167,  -1.53205454,  24.04563654],
       [ -0.49349671,  -1.37866847,  18.40461814],
       [ -1.32584701,  -2.29635678,  14.24374119]])

In [45]:
plt.plot(states)


Out[45]:
[<matplotlib.lines.Line2D at 0x7f62c0513908>,
 <matplotlib.lines.Line2D at 0x7f62b6e56630>,
 <matplotlib.lines.Line2D at 0x7f62b6e56898>]