Ticket #18047: temp.py
File temp.py, 359 bytes (added by krunk7@…, 16 years ago) |
---|
Line | |
---|---|
1 | #!/opt/local/bin/python2.5 |
2 | from pylab import * |
3 | import time |
4 | |
5 | ion() |
6 | |
7 | tstart = time.time() # for profiling |
8 | x = arange(0,2*pi,0.01) # x-array |
9 | line, = plot(x,sin(x)) |
10 | for i in arange(1,200): |
11 | line.set_ydata(sin(x+i/10.0)) # update the data |
12 | draw() # redraw the canvas |
13 | |
14 | print 'FPS:' , 200/(time.time()-tstart) |