Custom made colormaps

Hello,

I am trying convert a plot written in IDL to Python using matplotlib. So far, I have managed to show the image on the screen equivalent to its IDL output. The only problem that I could not figure out matching the colormaps between them. Please see the results on this png image: http://img515.imageshack.us/img515/3951/colormaps.png

The top plot and the associated colorbar is from IDL, and the other plot is using matplotlib’s imshow(). I don’t know how to show my lowest values in the plot as white. I would be please if someone gives some insight into this issue.

Thank you all.

Gökhan

Gökhan SEVER wrote:

Hello,

I am trying convert a plot written in IDL to Python using matplotlib. So far, I have managed to show the image on the screen equivalent to its IDL output. The only problem that I could not figure out matching the colormaps between them. Please see the results on this png image: http://img515.imageshack.us/img515/3951/colormaps.png

The top plot and the associated colorbar is from IDL, and the other plot is using matplotlib's imshow(). I don't know how to show my lowest values in the plot as white. I would be please if someone gives some insight into this issue.

See http://matplotlib.sourceforge.net/examples/pylab_examples/image_masked.html
and in particular the use of set_under().

Eric

···

Thank you all.

Gökhan

Thanks for the reply Eric,

MayaVi 2 has an imshow() function as well. Additionally, its UI allows me visually design colormaps for my figures. It is a very useful aid, indeed.

MV also allows me view my dual-doppler analysis dia volumetrically and allow to cut sections within 3D data. Another nice thing is that, matplotlib’s pylab and mayavi’s mlab work very well inside ipython.

Gökhan

···

On Mon, Apr 6, 2009 at 9:34 PM, Eric Firing <efiring@…202…> wrote:

Gökhan SEVER wrote:

Hello,

I am trying convert a plot written in IDL to Python using matplotlib. So far, I have managed to show the image on the screen equivalent to its IDL output. The only problem that I could not figure out matching the colormaps between them. Please see the results on this png image: http://img515.imageshack.us/img515/3951/colormaps.png

The top plot and the associated colorbar is from IDL, and the other plot is using matplotlib’s imshow(). I don’t know how to show my lowest values in the plot as white. I would be please if someone gives some insight into this issue.

See http://matplotlib.sourceforge.net/examples/pylab_examples/image_masked.html

and in particular the use of set_under().

Eric

Thank you all.

Gökhan