Plotting surfacem on top of worldmap/geoshow
조회 수: 14(최근 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.
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);
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);