フィルターのクリア

Pcolor Map showing up blank?

4 ビュー (過去 30 日間)
Shayma Al Ali
Shayma Al Ali 2023 年 8 月 21 日
回答済み: Voss 2023 年 8 月 21 日
Hi everyone!
I'm trying to plot a map using pcolor, however the map ends up being blank. I'm not really sure what I'm doing wrong? I attached the code below, and an image of the map that my code has been creating.
My code:
%create data
lat=[-90:0.25:90];
lon=[0:0.25:359.75];
smean=rand(1440,721);
figure(121)
worldmap([-90 90], [0 360])
load coastlines
pcolor(lat,lon,smean); hold on
geoshow(coastlat,coastlon,'Color','k'); hold off
h=colorbar;
%h.Label='Difference in SWH measurement (m)';
ylabel(h,'Kw (cm hr-1','FontSize',10);
title('Climatological Mean of Kw for January')

回答 (1 件)

Voss
Voss 2023 年 8 月 21 日
Use pcolorm
%create data
lat=[-90:0.25:90];
lon=[0:0.25:359.75];
smean=rand(1440,721);
figure(121)
worldmap([-90 90], [0 360])
load coastlines
pcolorm(lat,lon,smean); hold on
geoshow(coastlat,coastlon,'Color','k'); hold off
h=colorbar;
%h.Label='Difference in SWH measurement (m)';
ylabel(h,'Kw (cm hr-1','FontSize',10);
title('Climatological Mean of Kw for January')

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by