Scatter chart: How to adjust the transparency of marker?

201 visualizaciones (últimos 30 días)
wesleynotwise
wesleynotwise el 16 de Jun. de 2017
Comentada: Adam Danz el 4 de Ag. de 2020
Wondering how to change the transparency of marker from plot tools? At the moment, I can only adjust the line thickness and line colour of the marker, and the size and face colour of the marker. Where to find the transparency scale of the colour, like in Excel, where one can just simply adjust it?

Respuestas (2)

Sachindra Dhanapala Arachchige
Sachindra Dhanapala Arachchige el 16 de Mayo de 2018
to fill the markers just add f1 = scatter(.....,'filled',....) then try f1.MarkerFaceAlpha = 0.2; should work.

MathReallyWorks
MathReallyWorks el 16 de Jun. de 2017
Hello,
Use this code:
ax = axes;
hold on;
for i = 1:10
s = scatter(10*rand(1),10*rand(1),36,rand(1,3),'filled'); %This is random data. You can use yours.
s.MarkerFaceAlpha = rand(1); %%marking every maker with different alpha value
end
  2 comentarios
wesleynotwise
wesleynotwise el 16 de Jun. de 2017
Editada: wesleynotwise el 17 de Jun. de 2017
Hello. Hello. It does not work in my case?
f1 = gscatter(x, y, GroupCountry, 'mgbr', 'oooo')
f1.MarkerFaceAlpha = 0.2;
I know my marker is a hollow circle 'o', how to turn it into a filled circle? I am not using '.' as I want the edge of marker to be black, and the filled colour is semi-transparent.
I am giving the above example where I have 4 groups of data, another plot of mine contains 12 groups (crazy!), which I plan to use different shades of red, blue, green, etc to identify them, but I still want them in semi-transparent.
Any thoughts?
Adam Danz
Adam Danz el 4 de Ag. de 2020
To set transparency with gscatter, see this answer.

Iniciar sesión para comentar.

Categorías

Más información sobre Scatter Plots 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