MATLAB: ‘jet’ countour plot over grayscale image

colormapplot

How do I plot a grayscale image with a contourmap over it. The contourmap should have the 'jet' colormap. Simply adding cmap = [jet(32); gray(32)]; makes the contourmap gray. I have tried the methods mentioned in http://www.mathworks.se/support/solutions/en/data/1-GNRWEH/index.html, but none seem to be able to make the grayscale image only grayscale and the contourmap only jet.

Best Answer

I suggest you use the File Exchange contribution "freezeColors" on the grayscale image.