How to add legends in graphs generated within a for loop.
1 次查看(过去 30 天)
显示 更早的评论
I am writing a program in which graphs are generated within a for loop. How can I add legends for all the graphs.
for jj = 1 : 1 : NOE
ElementShape = dispVector( jj, 1) * shapeFunction1 + dispVector( jj+1, 1) * shapeFunction2;
range = ( jj - 1) * h : stepSize : jj * h;
totalShape = [totalShape, ElementShape];
totallength = [totallength, range];
plot(totallength, totalShape)
hold on
end
0 个评论
采纳的回答
更多回答(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!