i want to plot a 2D surface color map plot

조회 수: 5 (최근 30일)
Joseph
Joseph 2014년 9월 30일
댓글: Image Analyst 2014년 10월 1일
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
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
Chad Greene 2014년 9월 30일
Use imagesc or pcolor. Before plotting you may wish to set concentration(concentration==-999)=NaN;

Image Analyst
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).

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by