setting transparancy of legend?

157 visualizaciones (últimos 30 días)
Micke Malmström
Micke Malmström el 12 de En. de 2017
Comentada: Hakon Haugnes el 17 de Ag. de 2023
Is it possible to make the background of the legend be slighly transparent so that the lines behind it can be somewat visible?
  1 comentario
Walter Roberson
Walter Roberson el 16 de En. de 2017
I will not say that it is impossible at the moment. It is certainly not documented. You just might be able to change it using one of the hidden properties of the legend. Perhaps one of the ColorSpace properties. Nothing I have tried has worked yet.

Iniciar sesión para comentar.

Respuesta aceptada

alice
alice el 27 de Jun. de 2017
In undocumented Matlab, you will find how to do it here: http://undocumentedmatlab.com/blog/transparent-legend.
  3 comentarios
Miquel
Miquel el 31 de En. de 2020
Awesome, guys! Thanks :)
Hakon Haugnes
Hakon Haugnes el 17 de Ag. de 2023
echo that: awesom

Iniciar sesión para comentar.

Más respuestas (2)

Ilja Maljutenko
Ilja Maljutenko el 19 de Mayo de 2021
This solution seems to work in Matlab 2020 +
h_leg.BoxFace.ColorType='truecoloralpha';
h_leg.BoxFace.ColorData=uint8(255*[1 1 1 0.75]');
where h_leg is your legend box handle.

Wilson A N
Wilson A N el 16 de En. de 2017
Editada: Walter Roberson el 16 de En. de 2017
You can refer to the link given below on how to set the different properties of legend
To change the background color of the legend you can change the 'Color' field to achieve the required transparency.
  3 comentarios
James Richard
James Richard el 17 de Dic. de 2019
Any news on this?

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by