Hi, I have a 360*720 matric which includes the value of the temperature of the globe with the spatial resolution of 0.5 degree. I would like to plot this metric as a map after I used the following code;
figure;
worldmap world
load coastlines
plotm(coastlat, coastlon)
Thanks in advace.

1 件のコメント

Sreeraj T
Sreeraj T 2022 年 12 月 22 日
I am not sure whether you are following this thread anymore. I do not see any MWE. But I guess that instead of 'plotm', the command 'surfm' would be useful.

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

回答 (1 件)

Greg
Greg 2026 年 9 月 3 日 13:53

1 投票

Hi Peyman, Thank you for your question. The latitude and longitude vectors must match the actual center coordinates of the matrix cells. If the first row of your matrix T represents southernmost latitudes, reverse the latitude vector or use flipud(T). pcolorm creates the temperature map, and plotm overlays the coastlines.
% Specify your matrix T as the 360-by-720 temperature matrix
lat = 89.75:-0.5:-89.75; % adjust to your data orientation
lon = -179.75:0.5:179.75;
figure
worldmap("World")
pcolorm(lat, lon, T)
shading flat
colorbar
colormap parula
load coastlines
plotm(coastlat, coastlon, "k", "LineWidth", 0.5)
Thank you, Greg

タグ

質問済み:

2018 年 1 月 10 日

編集済み:

2026 年 9 月 3 日 20:29

Community Treasure Hunt

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

Start Hunting!

Translated by