Is it possible to reduce the alpha for markers in a simple plot?
26 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Wolfgang McCormack
el 12 de Mzo. de 2021
Comentada: ANKUR KUMAR
el 15 de Mzo. de 2021
Hi all,
I am having a simple plot like
plot(X,Y, 'MarkerFaceColor','#0072BD')
Is it possible to reduce the transparency of MarkerFaceColor to 0.5?
Thanks in advance
0 comentarios
Respuesta aceptada
ANKUR KUMAR
el 12 de Mzo. de 2021
Editada: ANKUR KUMAR
el 12 de Mzo. de 2021
Plot function doesn't have support to tune transparency. You can use scatter to do that
scat = scatter(x,y,'MarkerFaceColor','b','MarkerEdgeColor','r');
scat.MarkerFaceAlpha = .5;
scat.MarkerEdgeAlpha = .5;
You can manipulate the color values, if you wish to use plot function.
hand = plot(X,Y,'r');
hand.LineWidth = 2;
hand.Color(4)=0.2; % this would act as your alpha value or transparency factor.
2 comentarios
ANKUR KUMAR
el 15 de Mzo. de 2021
First three indices are for RGB color, and the fourth index is the transparency.
Más respuestas (0)
Ver también
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!