Plotting Legends of Rows of a Matrix ???
5 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I have a matrix A=[1 2 3 4; 1 2 3 5; 2 3 4 5 ...]; I want to plot legend of the rows of A.
For pink curve, there will be a legend [1 2 3 4], for blue curve there will be a legend [1 2 3 5] etc. I want to change rows and colors and markers.
How can I do that??? (without writing one by one)
Thanks a lot.
0 件のコメント
回答 (1 件)
Ahmed A. Selman
2013 年 3 月 30 日
A=[1 2 3 4; 1 2 3 5; 2 3 4 5];
plot(A)
C=num2str(A);
H=legend(C);
set(H,'Interpreter','none');
2 件のコメント
Ahmed A. Selman
2013 年 3 月 31 日
set gives the graphic object (the plot window) its properties such as color, legend, .. etc. I think you should goto (from Edit menu-- Figure properties) and try (More Properties). There are a bunch of useful things to set up there, no need to write a code of any kind.
Regards :)
参考
カテゴリ
Help Center および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!