MATLAB: How to i reset/clear an figure in app designer

app designerfigureMATLAB

I tried to write
app.UIAxes.cla;
or
cla(app.UIAxes)
but it doesn't do the job.
Yes it clears the figure, but when I replot something, in the same figure, the old data is still there.
How can I remove this previous data/plots?

Best Answer

Found the solution.
cla(app.UIAxes)
worked for me.
Befor I got an error: "Reference to a cleared variable app". This was because of a
clear all
. Without it, everything is fine.