Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af196d0

Browse files
author
Steve Chaplin
committed
SC
svn path=/trunk/matplotlib/; revision=2983
1 parent 852e4e3 commit af196d0

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

examples/dynamic_demo.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
2-
import pygtk
3-
pygtk.require('2.0')
2+
3+
import gobject
44
import gtk
55

66
from pylab import *
@@ -16,13 +16,12 @@ def updatefig(*args):
1616
lines[0].set_data(ind, X[:,updatefig.count])
1717
manager.canvas.draw()
1818
updatefig.count += 1
19-
if updatefig.count<10: return gtk.TRUE
20-
else: return gtk.FALSE
19+
if updatefig.count<10:
20+
return True
21+
else:
22+
return False
2123

2224
updatefig.count = 0
2325

24-
gtk.timeout_add(300, updatefig)
26+
gobject.timeout_add(300, updatefig)
2527
show()
26-
27-
28-

0 commit comments

Comments
 (0)