Scattered points not plotting on top of pcolorm?

1 vue (au cours des 30 derniers jours)
Shayma Al Ali
Shayma Al Ali le 17 Nov 2021
Commenté : Kelly Kearney le 17 Nov 2021
I want to make a plot of wind speeds as a colormap and then plot points on top of the colormap that shows the trajectory of a satellite over the region. However, once I plot the points, only the color maps show up. How do I plot the points so they can be seen?
lat1=d.lat(1); lat2=d.lat(20); lon1=d.lon(1); lon2=d.lon(40);
figure(400)
subplot(2,2,1)
worldmap([lat1 lat2], [lon1 lon2])
pcolorm(d.lat,d.lon,ccmp.wind1(:,:,19))
h=colorbar;
caxis([0 25])
ylabel(h,'CCMP Wind Speeds')
title('CCMP Winds at 12 AM on 1-Mar-2012');
subplot(2,2,2)
worldmap([lat1 lat2], [lon1 lon2])
pcolorm(d.lat,d.lon,ccmp.wind1(:,:,20));
hold on
plotm(m2.lat,m2.lon,rand2,'k*','LineWidth',15);
h=colorbar;
caxis([0 25])
ylabel(h,'CCMP Wind Speeds')
title('CCMP Winds at 12 AM on 2-Mar-2012');
subplot(2,2,3)
worldmap([lat1 lat2], [lon1 lon2])
pcolorm(d.lat,d.lon,ccmp.wind1(:,:,21))
h=colorbar;
caxis([0 25])
ylabel(h,'CCMP Wind Speeds')
title('CCMP Winds at 12 AM on 3-Mar-2012');
subplot(2,2,4)
worldmap([lat1 lat2], [lon1 lon2])
pcolorm(d.lat,d.lon,ccmp.wind1(:,:,22));
hold on
plotm(m4.lat,m4.lon,rand4,'k*','LineWidth',15);
h=colorbar;
caxis([0 25])
ylabel(h,'CCMP Wind Speeds')
title('CCMP Winds at 12 AM on 4-Mar-2012');
The resulting plot looks like this without any of the points:
How do I fix it?
  1 commentaire
Kelly Kearney
Kelly Kearney le 17 Nov 2021
It's difficult to diagnose the problem without seeing what your data values are. My first guess would be that the z-data for your satellite trajectory (i.e. rand1/2/3/4) are negative. By default, pcolorm places its surfaces at z = 0, so the plotted lines might be hiding underneath those surfaces.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by