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

조회 수: 4 (최근 30일)
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

채택된 답변

Jan
Jan 2019년 3월 28일
  댓글 수: 3
Jan
Jan 2019년 3월 28일
I'm not sure if I understand your comment. What about:
[~,h_legend] = legend(par.Names)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by