2 Scenario Legend Setup

I wish to make a legend plot that separates 2 experiments by color while sepparating the inputs by line style, inputs for both experiments were the same. What is the best way to go about making a legend like this?

回答 (2 件)

madhan ravi
madhan ravi 2020 年 10 月 18 日

0 投票

plot(1:5, '-k')
hold on
plot(6:10, ':y')
legend({'Leg 1', 'Leg2'}) %?
Star Strider
Star Strider 2020 年 10 月 18 日

0 投票

See the Line Properties documentation on DisplayName.
That might do what you want.

カテゴリ

タグ

質問済み:

2020 年 10 月 18 日

回答済み:

2020 年 10 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by