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

4 次查看(过去 30 天)
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!!!!!!

采纳的回答

Chad Greene
Chad Greene 2015-2-3
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 个评论
SO
SO 2015-2-5
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 2015-2-5
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Orange 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by