Download this file
27 lines (20 with data), 542 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 | #!/usr/bin/env python2.3
import matplotlib.matlab
import gtk
import Numeric
fig = matplotlib.matlab.figure(1)
ind = Numeric.arange(60)
x_tmp=[]
for i in range(100):
x_tmp.append(Numeric.sin((ind+i)*Numeric.pi/15.0))
X=Numeric.array(x_tmp)
lines = matplotlib.matlab.plot(X[:,0],'o')
def updatefig(*args):
updatefig.count += 1
if updatefig.count>59: updatefig.count=0
lines[0].set_data(ind,X[:,updatefig.count])
fig.draw()
return gtk.TRUE
updatefig.count=-1
gtk.timeout_add(200,updatefig)
matplotlib.matlab.show()
|
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.