Two issues with your code that should significantly speed things up.
First, by calling imshow() each time for the draw, there is significant
overhead caused by this. Instead -- (and this is a huge speedup) -- save
the object returned by the first call to imshow(). That object has a method
".set_array()" that will allow you to just change the data contained within
the AxesImage object. This is *much* faster than calling imshow()
repeatedly. Note that the array going into set_array() will have to be of
the same shape as the original image.
Second, by setting the "interpolation" kwarg to *None*, you are merely
telling imshow() to use the default interpolation specified in your rcParams
file. Instead, you probably want "nearest". Actually, supposedly, the
upcoming release is supposed to support a new value "none" for absolutely no
interpolation at all. The idea would be that one would pre-interpolate the
image data before sending it to imshow() and have imshow set to do no
interpolations at all. Therefore, the images display much faster.
I hope this helps!
Ben Root
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users