Plot - add legend individually
显示 更早的评论
How can I update the legend of each plot individually rather than at the end of the code ?
plot(x1, y1, '-vr', 'LineWidth', linewidth, 'MarkerSize', markersize);
legend('Algorithm 1');
plot(x2, y2, '-vr', 'LineWidth', linewidth, 'MarkerSize', markersize);
legend('Algorithm 2');
The code above overwrites the legend for Algorithm 1
1 个评论
ROBIN KUMAR
2022-2-18
The same problem I have been facing with R2021a version. Please help me execute the same..
采纳的回答
更多回答(1 个)
ROBIN KUMAR
2022-2-18
0 个投票
The same problem I have been facing with R2021a version. Please help me execute the same..
类别
在 帮助中心 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!