Clearing legend in GUI plot
이전 댓글 표시
Hello all,
I'm working on my first GUI and I am having trouble getting the legend to clear/hide when I hide a figure. I am able to hide the axes and the data plot using 'cla' but I can't figure out how to make the legend go away.
Any thoughts would be much appreciated! -Amanda
답변 (2개)
Azzi Abdelmalek
2013년 8월 21일
편집: Azzi Abdelmalek
2013년 8월 21일
legend('hide')
%for your GUI it is:
legend(handles.axes1,'hide')
댓글 수: 2
chlor thanks
2016년 8월 11일
This works for my question too! Thanks Azzi!
Abdurrehman
2017년 7월 13일
Jazakallah o khair dear Azizi
KAE
2017년 7월 18일
If you instead want to delete the legend from your GUI rather than hide it,
legend(handles.axes1, 'off');
카테고리
도움말 센터 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!