Lable in a for loop (subplots)
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Simon
am 6 Jul. 2014
Beantwortet: Image Analyst
am 6 Jul. 2014
I have many subplots produced by a for loop and want to label them on the y-axis via ylabel. The code looks like this:
for m=1:n
subplot...
ylabel (...)
end
Is it possible to name each subplot with the letter M and the number from the for loop, n? So that I have M1, M2, M3,... Mn on the y-axis.
Thanks!
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 6 Jul. 2014
for m=1:n
subplot...
mLabel = sprintf('M%d', m);
ylabel(mLabel, 'FontSize', 15);
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!