Borrar filtros
Borrar filtros

How to add transparency to plot3?

81 visualizaciones (últimos 30 días)
BananaBandana
BananaBandana el 17 de Oct. de 2019
Respondida: Sri Harsha Kondapalli el 17 de Oct. de 2019
Hello!
I have a simple code, where I plot a circle in a grid. The important part for the circle is this:
h = plot3(1.5,2.5,2.5,'o','MarkerSize',50,...
'MarkerEdgeColor','k',...
'MarkerFaceColor',[0 0.5 0]);
I want to add a transparency, but somehow nothing is working. I tried alpha, markerfacealpha or something with h.Color(4) = ... nothing worked.
Any ideas?
Thanks!

Respuesta aceptada

Sri Harsha Kondapalli
Sri Harsha Kondapalli el 17 de Oct. de 2019
Try using sphere funtion instead of plot3 for 3D objects where you can define edge and face alphas seperately. Go to property editor for all available options.
[x y z]=sphere(100);
surf(x,y,z);
In case you are looking for chaging alpha for markers, refer to the following link for more information

Más respuestas (0)

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by