MATLAB Answers


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



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


%for your GUI it is:



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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!