How can I give legend to a plot as a series?
2 次查看(过去 30 天)
显示 更早的评论
Suppose I have multiple graphs on a plot for a parameter varying from -4 to 0.25 with difference of 0.25 between adjacent values (which is about 18 in number)? Can I say like legend y. where y is a variable varying from -4 to 0.25?
0 个评论
采纳的回答
Kelly Kearney
2015-4-8
Example data:
x = 1:10;
h = plot(x, x'*p)
Create legend:
legend(h, cellstr(num2str(p', '%.2f')));
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!