Effacer les filtres
Effacer les filtres

Pcolor Map showing up blank?

4 vues (au cours des 30 derniers jours)
Shayma Al Ali
Shayma Al Ali le 21 Août 2023
Réponse apportée : Voss le 21 Août 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')

Réponses (1)

Voss
Voss le 21 Août 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')

Catégories

En savoir plus sur Geographic Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by