Plotting coastlines at different levels in a 3D plot
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Arun Nair
el 18 de Mzo. de 2019
Comentada: Arun Nair
el 18 de Mzo. de 2019
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 comentarios
Respuesta aceptada
Bjorn Gustavsson
el 18 de Mzo. de 2019
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
Más respuestas (0)
Ver también
Categorías
Más información sobre Blue en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!