How to add legends in graphs generated within a for loop.

1 回表示 (過去 30 日間)
Ali Baig
Ali Baig 2017 年 7 月 19 日
回答済み: Walter Roberson 2017 年 7 月 19 日
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

採用された回答

Walter Roberson
Walter Roberson 2017 年 7 月 19 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by