From: John H. <jdh...@ac...> - 2005-05-03 02:52:10
|
>>>>> "Zelakiewicz," == Zelakiewicz, Scott (Research) <zel...@cr...> writes: Scott> I routinely plot fairly large datasets (~4million Scott> points) using imshow but on my machine this takes Scott> about 11 secs to complete. I went through the code Scott> and made a couple of minor changes where the image Scott> data would get clipped by vmax and vmin only if the Scott> user supplied a vmax or vmin. The clipping is Scott> unnecessary if the user does not supply these values Scott> since vmax and vmin default to the max and min in Scott> the image. I also replaced two successive Scott> where(...) calls with a single clip(...) call and Scott> that seems to have helped a tiny bit as well. This Scott> change has been tested on 0.80 compiled with Scott> Numeric, though I can't envision how this would Scott> break anything. The profiler tells me that my plot Scott> time has decreased from 11.8 sec to 7.2 sec. Hope Scott> 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 |