Plotting coastlines at different levels in a 3D plot
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a 3D plot of Cloud Top Pressure. I need to plot coastline at the base of this 3D plot. But since CTP decreases with height, when I plot (>> load coast), the map lies above the 3D plot. How do I modify it so that the my coastlines lie below the CTP. Image for reference.

Code:
for j = 1:8
CTP_a = reshape(CTP(j,:,:),159,155);
surf(LON,LAT,CTP_a)
hold on
shading interp
az = -28;
el = 75;
view(az, el);
set(gca,'YLim',[0 35],'tickdir','out','ytick',[0:10:30],'yticklabel',[{'Eq','10^oN','20^oN','30^oN'}],'Fontweight','bold')
set(gca,'XLim',[60 90],'tickdir','out','xtick',[60:10:90],'xticklabel',[{'60^oE','70^oE','80^oE','90^oE'}],'Fontweight','bold')
set(gca,'Zdir','reverse')
colormap (jet(50))
colorbar vert
caxis([0 1000])
load coast
plot(long,lat,'-k')
end
댓글 수: 0
채택된 답변
Bjorn Gustavsson
2019년 3월 18일
Since you've selected to set zdir to 'reverse' your coastline-plot might look better something like this:
z_bottom = max(get(gca,'ZLim'));
plot3(long,lat,z_bottom*ones(size(lat)),'k')
HTH
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!