Skip to content

Instantly share code, notes, and snippets.

@akira093
Created November 15, 2013 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akira093/7479592 to your computer and use it in GitHub Desktop.
Save akira093/7479592 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import matplotlib
matplotlib.use("TkAgg")
import pylab
import time
pylab.figure(figsize = (4,3))
pylab.ion()
x = pylab.arange(0, pylab.pi * 4, .1)
ax = pylab.gca()
for i in range(80):
pylab.ylim(-2, 2)
pylab.plot(x, pylab.sin(x + pylab.pi / 10. * i) + pylab.sin(x + pylab.pi / 20. * i))
pylab.draw()
#time.sleep(.2)
pylab.savefig("{0:02d}.png".format(i))
ax.clear()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment