#!/usr/bin/env python
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

import lorenz63 as l63

# Time settings
# Total integration time
t_end = 100.
# Output timestep
dt = 0.01

# Parameter values
sigma = 10.
b = 8./3.
r = 0.1

# Initial condition
x0 = 1.21
y0 = 1.02
z0 = 28.0

w, t = l63.integrate_system([x0, y0, z0], t_end, dt, p=[sigma, b, r])

axarr = l63.plot_components(w, t)

fig = plt.figure()

ax = fig.add_subplot(111, projection='3d')

l63.plot_attractor(w, axes=ax)

ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('z')

plt.show()
plt.close('all')
