MATLAB Answers

contours plot over heat map in matlab

161 views (last 30 days)
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

  0 Comments

Sign in to comment.

Accepted Answer

Kelly Kearney
Kelly Kearney on 8 Jun 2016
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.

  10 Comments

Show 7 older comments
Muhammad Usman  Saleem
Muhammad Usman Saleem on 16 Jun 2016
Step by step explainations of your kind rely
(1) I want to investigate atmospheric fronts, cyclones, advaction activities, for which i have to prepared upper air chat. I am using Matlab for this(Please if you know other meterology chat software tell me?). Actually i have time series data set of 30 years,There are three pressure levels( means three such maps will be form) for one year, that why i am looking to hanging one year map(three) in 3d space? I want to explain these meterology phonomenas in details through matlab mapping?
(2) Want to show upper air weather condition with these figures.
(3) Is in matlab, there is some kind model exitted? I means i give this model this 30 year time series meterological dataset as input and get forcasting for next years?
Kind Regards;
Kelly Kearney
Kelly Kearney on 16 Jun 2016
1 & 2. This is a research question, not a Matlab one. Yes, you can visualize upper atmosphere data using Matlab. Exactly how you go about visualizing it is up to you... only you know what point you're trying to convey with those visualizations.
3. You want a pre-existing model for weather/climate forecasting, based on a single timeseries? Again, this is a research question. I'm sure there are plenty of small models out there written in Matlab (the true workhorse climate models are typically in Fortran)... if you get lucky, you may stumble upon one that has already built the exact model you need to address your question, and in Matlab to boot. But you'll probably need to build your own.
Muhammad Usman  Saleem
Muhammad Usman Saleem on 17 Jun 2016
Let's discuss this topic in detail on Linkedin. I am here on LinkedIn . I think , I can discuss with you in detail research problem on meteorology, climatology there.
Now matlab,
Let say, I have three such kind of maps, which i want to show as sclice in 3d in matlab. Can you guide me how can i show this?
Thanks

Sign in to comment.

More Answers (1)

KSSV
KSSV on 8 Jun 2016
Try using freezeColors after hold on..... You may get the funciton from the link: http://in.mathworks.com/matlabcentral/fileexchange/7943-freezecolors---unfreezecolors

  1 Comment

Muhammad Usman  Saleem
Muhammad Usman Saleem on 8 Jun 2016
no ,this function only doing sub ploting in a figure. While i want to make contour plot on color map. Both temperature map and contour plot are of same regions and extend?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by