Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Clearing legend in GUI plot

Asked by Amanda on 21 Aug 2013

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

0 Comments

Amanda

Products

No products are associated with this question.

1 Answer

Answer by Azzi Abdelmalek on 21 Aug 2013
Edited by Azzi Abdelmalek on 21 Aug 2013
legend('hide')

%for your GUI it is:

legend(handles.axes1,'hide')

0 Comments

Azzi Abdelmalek

Contact us