Borrar filtros
Borrar filtros

Clearing legend in GUI plot

36 visualizaciones (últimos 30 días)
Amanda
Amanda el 21 de Ag. de 2013
Respondida: KAE el 18 de Jul. de 2017
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

Respuestas (2)

Azzi Abdelmalek
Azzi Abdelmalek el 21 de Ag. de 2013
Editada: Azzi Abdelmalek el 21 de Ag. de 2013
legend('hide')
%for your GUI it is:
legend(handles.axes1,'hide')
  2 comentarios
chlor thanks
chlor thanks el 11 de Ag. de 2016
This works for my question too! Thanks Azzi!
Abdurrehman
Abdurrehman el 13 de Jul. de 2017
Jazakallah o khair dear Azizi

Iniciar sesión para comentar.


KAE
KAE el 18 de Jul. de 2017
If you instead want to delete the legend from your GUI rather than hide it,
legend(handles.axes1, 'off');

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by