more fun with animation

Hi. Sorry if this was covered already, but I ran into a recent problem with animating an image using GTKAgg (and matplotlib 0.83.2). In my update_fig() function, I do:

im.set_data(g)
manager.canvas.draw()

where g is some arbritrary 20x20 array. Over time it's elements will be set to 1, and then decay exponentially. For the majority of the time the array contains all 0s. Under these conditions, it gets very choppy, and skips a large number of frames.

If I do something like: g[0, 0] = 1, then the animation runs smoothly, and looks like it's supposed to (except I now have one cell in the grid set the an incorrect value.

I haven't had time to do a full search yet, but was hoping someone might at least have an idea of where to begin to look. My current suspicions is that there might be a caching issue.

Thanks,

Abe

Sorry, realized I was a little vague. When I say, 'choppy', I mean that some cells won't get updated. If there is a lot of activity everything looks like, but once activity dies down, some elements stay on in various stages (somewhat like bad pixels).

Abraham Schneider wrote:

ยทยทยท

Hi. Sorry if this was covered already, but I ran into a recent problem with animating an image using GTKAgg (and matplotlib 0.83.2). In my update_fig() function, I do:

im.set_data(g)
manager.canvas.draw()

where g is some arbritrary 20x20 array. Over time it's elements will be set to 1, and then decay exponentially. For the majority of the time the array contains all 0s. Under these conditions, it gets very choppy, and skips a large number of frames.

If I do something like: g[0, 0] = 1, then the animation runs smoothly, and looks like it's supposed to (except I now have one cell in the grid set the an incorrect value.

I haven't had time to do a full search yet, but was hoping someone might at least have an idea of where to begin to look. My current suspicions is that there might be a caching issue.

Thanks,

Abe

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel