legend on subplot
조회 수: 48 (최근 30일)
이전 댓글 표시
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
답변 (2개)
ScottB
2012년 2월 16일
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
2012년 2월 16일
subplot(121);
peaks
legend('peaks');
subplot(122);
plot(1:10);
legend('1:10')
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!