#!/usr/bin/python
from __future__ import division
from numpy import sin
from matplotlib import pyplot as plt

# back main sin wave
x = [(i-633)/100 for i in range(1267)]
y = [sin(i) for i in x]
fig = plt.plot(x, y, 'r-')
ylim = plt.ylim(-2,2)
plt.show()

# make a minature sin wave
smally = [(sin(i*5)/5) for i in x]
fig = plt.plot(x, y, 'r-', x, smally, 'b-')
ylim = plt.ylim(-2,2)
plt.show()

# overlay minature y ontop of y
comby = [smally[i]+y[i] for i in range(len(y))]
fig = plt.plot(x, y, 'r-', x, comby, 'b-')
ylim = plt.ylim(-2, 2)
plt.show()

# overlay an even smaller wave ontop of that
smallery = [(sin(i*25)/25) for i in x]
comby2 = [smallery[i]+smally[i]+y[i] for i in range(len(y))]
fig = plt.plot(x, y, 'r-', x, comby, 'b-', x, comby2, 'k-')
ylim = plt.ylim(-2, 2)
plt.show()