legend on a plot.

2 次查看(过去 30 天)
Mate 2u
Mate 2u 2012-7-16
Hi All, I Plot a 250x10 matrix. But I only want the legend for the 3rd 5th and 9th element.
How can I do this?

采纳的回答

Sean de Wolski
Sean de Wolski 2012-7-16
Use the handle explicitly:
h = plot(cumsum(rand(250,10)));
legend(h([3 5 9]),'third','fifth','ninth')
And for more info:
doc legend

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Legend 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by