MATLAB: Contours plot over heat map in matlab

colormapcontourimage processingMapping ToolboxMATLABoverlaying

I have temperature and elevation data set in text files.By using this code I am trying to plot contours of height over heat map( color map) but when I plot these contours, figure turned to blue and color bar of heat map changed.
My requirements
I want to plot heat map(color map) from temperature data and want to plot over it height contours.
Both text files and shapefile has been attached with this post.
I shall be very thankful for this assistance

Best Answer

By default, the color limits of an axis are set to span the maximum range of plotted objects that could use a colormap. In your case, contour plots can use the colormap to color lines, and even though you changed this behavior by setting the contour line color to blue, the colormap is still adjusting itself to the limits of that data.
You can fix it by simply changing the axis color limits:
set(gca, 'clim', [min(Ci(:)) max(Ci(:))]);
Now, if you actually want to display a separate colormap for the contour lines than for the underlying geoshow plot, then you'll have to use something like freezeColors (older Matlab) or to layer axes on top of each other with different colormaps (R2014b+). But that isn't necessary in your example.