I'm using the code copied straight from the simple tkagg animation example at:


It starts up fine and I can see the moving sine wave, however, after about 15 to 20 seconds the plotting window freezes showing "Figure 1 (Not Responding)" and that's that. Adding an additional line, "print i" just before "line.set_ydata(...)" shows that even once the window has frozen the code is still being executed.  Has anyone had this problem and solved it?

I'm on Windows Vista running:
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
Matplotlib v0.98.3
numpy v1.2.0
Tkinter $Revision: 50704 $