legend on subplot
Ältere Kommentare anzeigen
Hi all
I have an figure. I have draw numbers of subplot on that figure using iteration. Now i want to add legend(want to show iteration no as legened on each subplot) in each plot during iteration. How i will do that. I am using guide. plz help me. Thank you for your support.
2 Kommentare
Sean de Wolski
am 16 Feb. 2012
You're using GUIDE and SUBPLOT()??
Why not just make the axes in GUIDE?
SUDIP PODDAR
am 16 Feb. 2012
Antworten (2)
ScottB
am 16 Feb. 2012
0 Stimmen
Each subplot is a unique axis. The legend command lets you specify the axis where the legend will be created:
"LEGEND(AX,...) puts a legend on the axes with handle AX."
So if you get the axis handles when you create the subplots you can then specify the legend for each subplot.
Sean de Wolski
am 16 Feb. 2012
subplot(121);
peaks
legend('peaks');
subplot(122);
plot(1:10);
legend('1:10')
1 Kommentar
Dan Po
am 30 Sep. 2016
this actually works compared to other answers
Kategorien
Mehr zu Legend finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!