How to plot humidity data on a world map?

3 ビュー (過去 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 件のコメント
SUSHOVAN GHOSH
SUSHOVAN GHOSH 2023 年 7 月 20 日
Please provide your data

サインインしてコメントする。

回答 (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 Center および File ExchangeWeather and Atmospheric Science についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by