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

8 ビュー (過去 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)
Moritz Pohl
Moritz Pohl 2019 年 3 月 29 日
My bad, worked perfectly fine!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by