pcolor getting slow

Hi dear users,
   Recently I found pcolor took tremendously longer to draw a figure than contour or imshow. I am wondering if anyone had the same experience, or anyone knows why? Thank you very much!
Jinbo

jinbo wang wrote:

Hi dear users,
   Recently I found pcolor took tremendously longer to draw a figure than contour or imshow. I am wondering if anyone had the same experience, or anyone knows why? Thank you very much!

Yes, pcolor is inherently very slow, but flexible. Imshow is very fast, but restricted in some ways (rectangular grid), flexible in others (it has a ridiculous number of interpolation options). Contouring is a completely different sort of operation.

Pcolor is slow because it uses a patch collection, which is not very quick to render; imshow goes straight to C++ code for rendering, and because of the simplicity of the imshow input, that code can be highly optimized.

You might try substituting pcolormesh for pcolor. It is not quite a general and flexible, but it is much more highly optimized for rendering with Agg.

Eric

···

Jinbo

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users