|
102 | 102 | " ax.set_xlim((-25, 25))\n", |
103 | 103 | " ax.set_ylim((-35, 35))\n", |
104 | 104 | " ax.set_zlim((5, 55))\n", |
105 | | - " \n", |
| 105 | + "\n", |
106 | 106 | " def lorenz_deriv(x_y_z, t0, sigma=sigma, beta=beta, rho=rho):\n", |
107 | 107 | " \"\"\"Compute the time-derivative of a Lorenz system.\"\"\"\n", |
108 | 108 | " x, y, z = x_y_z\n", |
|
116 | 116 | " t = np.linspace(0, max_time, int(250*max_time))\n", |
117 | 117 | " x_t = np.asarray([integrate.odeint(lorenz_deriv, x0i, t)\n", |
118 | 118 | " for x0i in x0])\n", |
119 | | - " \n", |
| 119 | + "\n", |
120 | 120 | " # choose a different color for each trajectory\n", |
121 | 121 | " colors = plt.cm.viridis(np.linspace(0, 1, N))\n", |
122 | 122 | "\n", |
|
160 | 160 | "metadata": {}, |
161 | 161 | "outputs": [], |
162 | 162 | "source": [ |
163 | | - "w = interactive(solve_lorenz, angle=(0.,360.), max_time=(0.1, 4.0), \n", |
| 163 | + "w = interactive(solve_lorenz, angle=(0.,360.), max_time=(0.1, 4.0),\n", |
164 | 164 | " N=(0,50), sigma=(0.0,50.0), rho=(0.0,50.0))\n", |
165 | 165 | "display(w)" |
166 | 166 | ] |
|
0 commit comments