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

New to MATLAB?

Clearing legend in GUI plot

Asked by Amanda

Amanda (view profile)

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

Amanda (view profile)

Products

No products are associated with this question.

1 Answer

Answer by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 21 Aug 2013
Edited by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 21 Aug 2013
legend('hide')

%for your GUI it is:

legend(handles.axes1,'hide')

0 Comments

Azzi Abdelmalek

Azzi Abdelmalek (view profile)

Contact us