How can I set transparency in geoshow map from a 2d array
Show older comments
I am trying to make a map that has a different transparency at each x,y as given by an array. The idea is to have a raster-generated colour-shading of the world surface, and then set the alpha at each pixel according to the population density at that point.
The map is generated from the 2d array Raster, using the reference R, and the alpha is given by alphas. Both arrays have the same dimensions. The values of alphas range from 0 to 1.
%code
figure
axesm('MapProjection','Mollweid')
h = geoshow(Raster,R,'DisplayType','texturemap','Alphadata',alphas)
There is no error message, but the resulting map does not have any transparency.
I have confirmed that the Rendered is openGL. I am using Matlab 2017a.
Thanks!
Answers (0)
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!