Filter löschen
Filter löschen

Pcolor Map showing up blank?

4 Ansichten (letzte 30 Tage)
Shayma Al Ali
Shayma Al Ali am 21 Aug. 2023
Beantwortet: Voss am 21 Aug. 2023
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')

Antworten (1)

Voss
Voss am 21 Aug. 2023
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')

Kategorien

Mehr zu Geographic Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by