필터 지우기
필터 지우기

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 CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by