Labelling mulitple traces on plot
古いコメントを表示
Hi,
How would you go about automatically labeling each trace on a plot for the case where the values are automatically generated in a for loop
from this

to this

The labels either sitting on top of each trace or adjacent outside the plot preferably with transparent background.
my code:
for nn = 1:Kappan
cc = jet(Kappan);
figure(1)
loglog(dratio,G(nn,:),'.-','color',cc(nn,:))
grid on
xlabel('Length / Diameter')
ylabel('Gain')
legend('boxoff'),legend(c,'location','NorthWest')
hold on
end
hold off
Thank You,
Joe
3 件のコメント
Walter Roberson
2013 年 3 月 18 日
What is your "c" variable that you are passing as the first argument to legend() ?
Joseph
2013 年 3 月 18 日
編集済み: Walter Roberson
2013 年 3 月 18 日
Walter Roberson
2013 年 3 月 18 日
I adjusted my code accordingly.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Axis Labels についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!