i want to plot a 2D surface color map plot
9 次查看(过去 30 天)
显示 更早的评论
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 个评论
Image Analyst
2014-10-1
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?
回答(2 个)
Chad Greene
2014-9-30
Use imagesc or pcolor. Before plotting you may wish to set concentration(concentration==-999)=NaN;
0 个评论
Image Analyst
2014-9-30
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!