I routinely plot fairly large datasets (~4million
> points) using imshow but on my machine this takes
> about 11 secs to complete. I went through the code
> and made a couple of minor changes where the image
> data would get clipped by vmax and vmin only if the
> user supplied a vmax or vmin. The clipping is
> unnecessary if the user does not supply these values
> since vmax and vmin default to the max and min in
> the image. I also replaced two successive
> where(...) calls with a single clip(...) call and
> that seems to have helped a tiny bit as well. This
> change has been tested on 0.80 compiled with
> Numeric, though I can't envision how this would
> break anything. The profiler tells me that my plot
> time has decreased from 11.8 sec to 7.2 sec. Hope
> this helps.
Thanks Scott -- this simple optimization should help a lot with common
use cases. I've applied it in my local tree (hasn't made CVS yet
because there are other more significant changes I'm working on that I
can't commit yet).
Thanks!
JDH