Plotting surfacem on top of worldmap/geoshow

11 visualizaciones (últimos 30 días)
Jani Puttonen
Jani Puttonen el 2 de Oct. de 2016
Comentada: Dong An el 28 de Mzo. de 2018
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.

Respuestas (1)

Amy Haskins
Amy Haskins el 3 de Oct. de 2016
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);
  1 comentario
Dong An
Dong An el 28 de Mzo. de 2018
Thanks Amy, im having the same question and 'FaceAlpha' really helps.

Iniciar sesión para comentar.

Categorías

Más información sobre Lighting, Transparency, and Shading 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!

Translated by