i want to plot a 2D surface color map plot
3 views (last 30 days)
Show older comments
I have a data set of CO concentration in the atmosphere for different altitudes according to the the latitude. I want to plot a 2D surface colormap for CO concentration for latitude and longitude. How can i do that?
all data is stored in one file lets say CO_DATA.and their sizes are:
altitude Size: 150x1
latitude Size: 32024x1
concentration Size: 150x32024
with dimensions mentioned above. so CO_DATA(i,j,k)= CO_DATA(latitude,altitude,concentration) so i->lat, j->altitude, k->concentration limits for latitude are min_lat= -85.2100 and max_lat= 86.6800 with 0.01 increment. limits for altitude are min_alt= 0.5000 and max_alt= 149.5000 with 1 increment. limits for concentration are min_con=-999 and max_con= 0.2640. so,i want to plot a color map that shows different concentrations with different colors in a 2D plot for altitude vs latitude. I attached a pdf file of an example plot to this question. Thank you
1 Comment
Image Analyst
on 1 Oct 2014
What do you mean by surface? There are no surface in there like MATLAB defines surface, which is a 2.5-D perspective rendering. All I see in the PDF document are flat 2D pseudocolored images. So what do you want: colroed 2.5D surface or images?
Answers (2)
Chad Greene
on 30 Sep 2014
Use imagesc or pcolor. Before plotting you may wish to set concentration(concentration==-999)=NaN;
0 Comments
Image Analyst
on 30 Sep 2014
I'd use imshow(). You can use imagesc() or image() also. With any of those 3, be sure to call colormap() with a colormap that you like. And you'll need to set up your tick marks, otherwise they're in pixels. I would not use pcolor() - I don't like that because it does not plot the last row or column of your array (just try it with a very small array and see for yourself).
0 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!