From: Arnd B. <arn...@we...> - 2004-12-20 09:21:02
|
Hi Eric, I am certain that John will be very delighted to have another of the "matplotlib is slow" e-mails ;-). Let me therefore add my 2 cents on this before he wakes up (hope I have the timezones right) and gives a qualified comment on this ... On Mon, 20 Dec 2004, Eric Emsellem wrote: [... timings etc snipped ... ] > Some info: > > running on a 1.6 Ghz/512 RAM centrino, linux, backend TkAgg, numarray, > float array of 1600x1600 pixels. > Using either imshow or figimage in ''ipython -pylab'' (tried different > interpolation schemes > the one I want being ''nearest'' in general) Did you also try a Numeric array? Another point: the imshow routine has quite a bit of functionality (color maps, interpolation, even alpha!!!) which might cost some time (for example, I don't know whether all this is done in python). You can also pass a PIL (Python Image Library) image to imshow. So I would suggest: a) try a Numeric array b) try to convert you matrix to a PIL image and determine the time it takes to display that. (I would hope that this is much faster) > To be frank, this is a killer for me, since I need to work on such images > (signal processing, analysing) and display them each time changing the > levels, centring etc etc. There is no way I will wait for 1 mn for 3 > successive displays... > > So the question now: > - am I doing something wrong (backend, way to load the array, ...) or is it > intrinsic to matplotlib ? To really answer this question it would be useful if you post your code (presumably simplified by creating some mock data without reading from an external file). By this one could also try this on other platforms ... [...] Best, Arnd |