How to plot humidity data on a world map?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi there,
I have average humidity data as well as longitude and latitude data from the corresponding weather stations. I'm relatively new to MatLab and would like to know how would I go about creating a colour map of this data?
Best regards,
Frank
1 commentaire
Réponses (1)
Nathan Hardenberg
le 20 Juil 2023
An easy way would be to use geoscatter(). This does not interpolate but just plots the points with color according to the value.
lon = -1*[165, 155, 155, 140, 132, 140, 145, 180, 165]; % data
lat = [55, 60, 70, 67, 62, 60, 70, 52, 65];
data = [3, 1, 5, 2, 0.5, 3, 4, 0, 1];
figure(1);
markerSize=1000;
geoscatter(lat, lon, markerSize, data, '.') % plot points
colormap(jet) % choose colormap
colorbar % show colorbar in figure
If you want to interpolate the data (get values in between), the problem gets quite a bit harder. There are ways to interpolate which are for example shown here:
and I also gave it a shot here:
The problem is that this interpolates in 2D and not on the earth (a spherical surface). For smaller regions that is good enough, but if you have the whole world for example this does not work anymore.
Sadly I did not find any easy solution for this problem
0 commentaires
Voir également
Catégories
En savoir plus sur Weather and Atmospheric Science dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!