Skip to content

Commit bcc5a03

Browse files
committed
got rid of _tkagg.cpp compiler warnings, and fixed animation_blit example
svn path=/trunk/matplotlib/; revision=1593
1 parent 9fbfaf1 commit bcc5a03

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

examples/animation_blit.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# the wiki entry
33
# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
44
import matplotlib
5-
#matplotlib.use('GTKAgg')
5+
matplotlib.use('GTKAgg')
66
import sys
77
import gtk, gobject
88
import pylab as p
@@ -41,7 +41,7 @@ def update_line(*args):
4141
# just redraw the axes rectangle
4242
canvas.blit(ax.bbox)
4343

44-
if update_line.cnt==50:
44+
if update_line.cnt==200:
4545
# print the timing info and quit
4646
print 'FPS:' , 200/(time.time()-tstart)
4747
sys.exit()
@@ -50,8 +50,5 @@ def update_line(*args):
5050
return True
5151
update_line.cnt = 0
5252

53-
#gobject.idle_add(update_line)
53+
gobject.idle_add(update_line)
5454
p.show()
55-
56-
57-

src/_tkagg.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ PyAggImagePhoto(ClientData clientdata, Tcl_Interp* interp,
108108
-destx, -desty);
109109
} else {
110110
bbox = NULL;
111+
destbuffer = NULL;
112+
destx = desty = destwidth = destheight = deststride = 0;
111113
}
112114

113115
/* setup tkblock */

0 commit comments

Comments
 (0)