How do I clear a figure?

215 views (last 30 days)
Tom
Tom on 10 Oct 2012
I am going to be generating a large number of plots and saving them. Each of the plots uses subplot. I'd rather not have to call figure each time to get a fresh figure. Is there some way to erase the plots in the current figure so that new plots can be drawn on it? I searched for "redraw" and "clear figure" and various other things but didn't find anything. I've tried redrawing over, but if the subplot configuration is the same, text gets overwritten.
I suppose I could call subplot(1,1,1) to erase the current configuration (all the plots I want to draw have more than one row or column), and then call subplots again. Does that effectively erase what was there before, or does memory start getting eaten up by an accumulation of plot data?
thanks for any help. This is probably a newby question.

Accepted Answer

Razvan
Razvan on 10 Oct 2012

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!