필터 지우기
필터 지우기

Clearing legend in GUI plot

조회 수: 36 (최근 30일)
Amanda
Amanda 2013년 8월 21일
답변: KAE 2017년 7월 18일
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
Azzi Abdelmalek 2013년 8월 21일
편집: Azzi Abdelmalek 2013년 8월 21일
legend('hide')
%for your GUI it is:
legend(handles.axes1,'hide')
  댓글 수: 2
chlor thanks
chlor thanks 2016년 8월 11일
This works for my question too! Thanks Azzi!
Abdurrehman
Abdurrehman 2017년 7월 13일
Jazakallah o khair dear Azizi

댓글을 달려면 로그인하십시오.


KAE
KAE 2017년 7월 18일
If you instead want to delete the legend from your GUI rather than hide it,
legend(handles.axes1, 'off');

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by