#!/usr/bin/env python
import matplotlib.pyplot as plt

import lorenz63 as l63

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

# First initial condition
x1 = 1.21
y1 = 1.02
z1 = 28.5

w1, t1 = l63.integrate_system([x1, y1, z1], t_end, dt)

# Second initial condition
x2 = 1.21
y2 = 1.02
z2 = 28.0

w2, t2 = l63.integrate_system([x2, y2, z2], t_end, dt)

plt.figure()

l63.plot_background_attractor()

l63.plot_orbit(w1, colour='blue', extremes=True)
l63.plot_orbit(w2, colour='black', extremes=True)

plt.xlabel('x')
plt.ylabel('z')

axarr = l63.plot_components(w1, t1, colour='blue')
axarr = l63.plot_components(w2, t2, colour='black', axarr=axarr)

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