How to plot geographical values against a parameter in a color map graph

1 vue (au cours des 30 derniers jours)
PARIVASH PARIDAD
PARIVASH PARIDAD le 7 Août 2019
Commenté : Anna S le 28 Août 2020
I have a excel file consisting of 4 columns. The first column is the sample number. The 2nd and 3rd are the geographical lat/long. The last column is the moisture values.
I need to plot a graph that shows the moisture of these points in a form of a color map. I attach my file. Can anyone help me? Thanks

Réponses (1)

Chad Greene
Chad Greene le 9 Août 2019
Parivash,
The first step is importing the data into Matlab. Unfortunately the lat and lon data are in degrees-minutes-decimal-seconds format, so xlsread might have some trouble with it. Maybe try removing all the degree symbols and import as space-delimited columns.
The next step is converting the dms format to decimal degrees, which you can do with dms2degrees if you have the Mapping Toolbox, or you can convert manually just by adding up the fractions of a degree and the fractions of a minute.
Then you'll have lon and lat in decimal degrees, and corresponding moisture values m. You can plot this as a color-scaled plot with the scatter function like
scatter(lon,lat,30,m,'filled')
and if you'd like to change the colormap you might like the cmocean rain colormap for moisture.
  1 commentaire
Anna S
Anna S le 28 Août 2020
Ah okay, so probably that is the problem of my dataset, because the interpolation of non-equally spaced and 'randomly' distributed grid points causes an error in creating the 'interpolated grid'.
Thanks!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Mapping Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by