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!