__author__ = 'student'
from math import *
import pylab
from matplotlib import mlab

xmin = -10.0
xmax = 10.0
dx = 0.1
xlist = mlab.frange (xmin, xmax, dx)

pylab.ion()

a=0.01
for i in range(100):
    a+=0.01
    a1 = [sin(a+x) for x in xlist]
    a2 = [cos(2*x) for x in xlist]
    pylab.clf()
    pylab.plot (a1,a2)
    pylab.draw()
pylab.close()