Ticket #18047: temp.py

File temp.py, 359 bytes (added by krunk7@…, 16 years ago)

Generic rendering code used to test CocoaAgg

Line 
1#!/opt/local/bin/python2.5
2from pylab import *
3import time
4
5ion()
6
7tstart = time.time()               # for profiling
8x = arange(0,2*pi,0.01)            # x-array
9line, = plot(x,sin(x))
10for i in arange(1,200):
11    line.set_ydata(sin(x+i/10.0))  # update the data
12    draw()                         # redraw the canvas
13
14print 'FPS:' , 200/(time.time()-tstart)