필터 지우기
필터 지우기

Scattered points not plotting on top of pcolorm?

조회 수: 1 (최근 30일)
Shayma Al Ali
Shayma Al Ali 2021년 11월 17일
댓글: Kelly Kearney 2021년 11월 17일
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
Kelly Kearney
Kelly Kearney 2021년 11월 17일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by