Borrar filtros
Borrar filtros

i want to plot a 2D surface color map plot

4 visualizaciones (últimos 30 días)
Joseph
Joseph el 30 de Sept. de 2014
Comentada: Image Analyst el 1 de Oct. de 2014
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 comentario
Image Analyst
Image Analyst el 1 de Oct. de 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?

Iniciar sesión para comentar.

Respuestas (2)

Chad Greene
Chad Greene el 30 de Sept. de 2014
Use imagesc or pcolor. Before plotting you may wish to set concentration(concentration==-999)=NaN;

Image Analyst
Image Analyst el 30 de Sept. de 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).

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by