Color Map.

Hello
folks,

I´m a new user of this forum. I’m trying to work in Python at the moment but
it´s quite difficult for me. My first question is if it is possible to do Color
Maps in Matplotlib in the same manner of the “mesh” function in
Matlab. Could you help me anybody?

Thanks in advance.

Regards.

···

Nuevo Windows Live, un mundo lleno de posibilidades Descúbrelo.

2009/1/15 Oscar ¿? <pititi2@...32...>
I´m a new user of this forum. I'm trying to work in Python at the moment but it´s quite difficult for me. My first question is if it is
possible to do Color Maps in Matplotlib in the same manner of the "mesh" function in Matlab. Could you help me anybody?

Hi Oscar,

Matplotlib is a purely 2D plotting library, it doesn't provide similar
capability to the Matlab 'mesh' function. For 3D plotting you could
use Mayavi

http://code.enthought.com/projects/mayavi/

You can probably still get great visualization of your results using
the Matplotlib functions pcolor, pcolormesh, contour, contourf or
imshow. See the documentation and examples at these links to get
started.

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.pcolor
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.pcolormesh
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow

http://matplotlib.sourceforge.net/examples/pylab_examples/pcolor_demo.html
http://matplotlib.sourceforge.net/examples/pylab_examples/pcolor_demo2.html
http://matplotlib.sourceforge.net/examples/pylab_examples/quadmesh_demo.html
http://matplotlib.sourceforge.net/examples/pylab_examples/contour_image.html

Also look at the pyplot tutorial and post to the list if you get stuck.

http://matplotlib.sourceforge.net/users/pyplot_tutorial.html

Cheers,
Scott

Oscar �? wrote:

Hello folks,

I�m a new user of this forum. I'm trying to work in Python at the moment
but it�s quite difficult for me. My first question is if it is possible
to do Color Maps in Matplotlib in the same manner of the "mesh" function
in Matlab. Could you help me anybody?

Since you're just starting out, I'd take a look at:

http://matplotlib.sourceforge.net/gallery.html

to get a feel for what's possible with matplotlib. It sounds like what you're
interested would be pcolor/pcolormesh.

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma