Plotting surfacem on top of worldmap/geoshow

24 次查看(过去 30 天)
I have Matlab 2016a with mapping toolbox. I'm trying to plot a world map and place some geographic data (some latitude/longitude grid data) on top of that with surfacem/pcolorm or similar. Everything works nicely, when I plot only the worldmap by itself or the surfacem/pcolorm plot by itself. However, when I try to plot them to the same figure, it shows only the latter plot. Thus, it seems that the latter plot overlaps and covers the first plot. I have tried to "hold on" after the first plot, but it does not have any effect. Any suggestions? Is there some way of making the plots transparent or something? I nave succeeded in making such a figure couple of years back, but now for some reason with no success.

回答(1 个)

Amy Haskins
Amy Haskins 2016-10-3
I suspect you're right about it being a stacking problem where the surface is hiding the other items on the map. If you save a handle to the surface when you call surfacem or pcolorm, you can use the uistack function to bring the surface to the bottom, making the other layers visible.
hSurf = surfacem(lat, lon, Z);
uistack(hSurf,'bottom')
If you want the surface to be semi-transparent for some other reason, you can use the FaceAlpha property.
hSurf = surfacem(lat, lon, Z, 'FaceAlpha', 0.5);

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by