How to set alpha value (transparency) of legend to match alpha in fill plot using automatically generated legend?

7 visualizaciones (últimos 30 días)
Hi,
crawling around the forums for a while now but haven't found any helpful answer. I create several fill plots and the legend with
for i = 1:6
fill(fillX, fillY, my_col(i,:), 'facealpha', fillAlpha, 'DisplayName', par.Names{i});
end
legend show
Everything works fine. The only issue is that the legend does not use the correct face alpha for the legend entries:
mathworks.PNG
I'm using MATLAB Version 2017a.
Kind regards,
Moritz

Respuesta aceptada

Jan
Jan el 28 de Mzo. de 2019
  3 comentarios
Jan
Jan el 28 de Mzo. de 2019
I'm not sure if I understand your comment. What about:
[~,h_legend] = legend(par.Names)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Legend en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by