How to plot humidity data on a world map?

조회 수: 5 (최근 30일)
Frank Gallagher
Frank Gallagher 2015년 10월 19일
답변: Nathan Hardenberg 2023년 7월 20일
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개)

Nathan Hardenberg
Nathan Hardenberg 2023년 7월 20일
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

카테고리

Help CenterFile Exchange에서 Weather and Atmospheric Science에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by