Plotting coastlines at different levels in a 3D plot

2 ビュー (過去 30 日間)
Arun Nair
Arun Nair 2019 年 3 月 18 日
コメント済み: Arun Nair 2019 年 3 月 18 日
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.CTP.png
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

採用された回答

Bjorn Gustavsson
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
  1 件のコメント
Arun Nair
Arun Nair 2019 年 3 月 18 日
It worked. Thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBlue についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by