How can I plot a colormap with user-defined color scale and x-y value in longitude-latitude?

2 visualizaciones (últimos 30 días)
I have to create a 2D TEC (Total Electron Content) Map like this: TEC Map Example (refresh again if you can't see)
I got data like this: (latitude, longitude, corresponding TEC value) for latitude from 80N to 80S and longitude from 180E to 180W (with interval: every 1 degree longitude and every 1 degree latitude)
What function should I use?
I tried the pcolor function but the result is not like the example above. It seems to be not smooth and the TEC value is not represented by a color grid (1*1 degree) but the intersection of x-y axes. One row and column data were missing on the map too.
I also want to define specific color scale for the map and set upper and lower limit (a specific color scale for TEC value 0 to 30)
How can I solve this problem? Thank!!!!!!
  1 comentario
Busra
Busra el 20 de En. de 2016
I'm looking for solutions to these problems. Have you been able to solve? if you are able to solve can you give more details?

Iniciar sesión para comentar.

Respuesta aceptada

Chad Greene
Chad Greene el 3 de Feb. de 2015
pcolor does throw a way a row and column of data, and offsets it by half a pixel. But if you use shading interp, you'll get the smoothness that you want and it won't be offset. Use imagesc if you don't want to get rid of all your data, or use pcolor like this:
pcolor(lon,lat,TEC)
shading interp % <- smooths the shading
caxis([0 30]) % <- sets color axis
To make it more map-like, if you have the mapping toolbox you'll be able to plot coastlines easily. Or you can search the internet for M_map, which is a free alternative to Matlab's Mapping Toolbox.
  2 comentarios
SO
SO el 5 de Feb. de 2015
Thank for your reply.
I tried your suggestion but the color map (attached) is not smooth enough. You can clearly see some 'edge' at the point of color (value) changing.
The data I used is 161 row * 361 column
Chad Greene
Chad Greene el 5 de Feb. de 2015
An argument could be made that the pixelated display is good, because it accurately represents the resolution of the underlying data. But, if you want smoother display, you could try bicubic interpolation to 0.1 degree resolution with interp2.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Geographic 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