Insert a table in a figure with the colour specifications of the lines!

2 ビュー (過去 30 日間)
Panos Ale
Panos Ale 2017 年 5 月 19 日
コメント済み: Star Strider 2017 年 5 月 19 日
Hallo! I have plot plotted three differet lines in a figure and I want to insert a table(box) to specify each of them based on their colour!
for example. 'blue line' controls 'green line' relatives 'red line' patients

採用された回答

Star Strider
Star Strider 2017 年 5 月 19 日
Use the legend function.
figure(1)
plot(x1, control, '-b', x2, relatives, '-g', x3, patients, '-r')
grid
legend('Controls', 'Relatives', 'Patients')
You can control where the legend appears in the plot with the 'Location' name-value oair. See the documentation for details.
  2 件のコメント
Panos Ale
Panos Ale 2017 年 5 月 19 日
Thank you very much!!!!
Star Strider
Star Strider 2017 年 5 月 19 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by