Instead of creating lots of figures, the idea is to create one plot and alter its properties. This could mean altering its data points, or axes, or orientation, or whatever you require.
Create just one figure (or a very small number), and always keep track of the graphics handles of everything that you plot. All graphics functions return a handle (well, most of them), and you can use this handle to specify where to plot your data, to delete, or alter parts of a figure, axes, line, patch, text, or any other graphics object.
Create the figure once, and then do not close it: simply change it as required, and ditto for its contents: add or delete axes, lines, patches, etc.
For example, to plot a simple function: >> fgh = figure();
>> axh = axes('Parent',fgh);
>> X = 0:0.1:pi;
>> Y = sin(X);
>> lnh = plot(axh,X,Y);
Now you can use set and get to alter properties of the objects (or dot notation of using R2014b or more recent). Note that you will need to carefully read the list of object properties (e.g. line properties), and be aware that sometimes multiple properties may need to be changed to get the desired effect: >> set(lnh,'XData',[0,1,2],'YData',[1,2,1])
You can delete or change any graphics objects:
Now that the axes are clear simply plot some new data... and so on.
To get the best information read the MATLAB documentation:
Best Answer