Excellent! That sped things up quite a bit. I can now flip through my small images with no perceivable delay. I will look forward to trying out the new interpolation setting when it gets here, since I have some larger images that still lag slightly.
If others want, I can repost my code with Ben's changes. Thanks a bunch! Tom On 08/17/2011 03:30 PM, Benjamin Root wrote: > 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