How can I plot a colormap with user-defined color scale and x-y value in longitude-latitude?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Busra
am 20 Jan. 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?
Akzeptierte Antwort
Chad Greene
am 3 Feb. 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 Kommentare
Chad Greene
am 5 Feb. 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Orange finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!