You can put the code you use to generate your base figure into a function, then call that function multiple times to create multiple copies of your base figure. You will want to return the graphics handles for those figures (and probably their axes) as outputs from the function in order to modify each with a different set of plotted data. For example, this function makes a 500-by-500 pixel figure positioned 100 pixels in from the left and bottom of the screen with a red background and one axes with a given set of input data plotted on it:
function [hFigure,hAxes] = make_my_figure(dataX,dataY)
hFigure = figure('Color','r','Position',[100 100 500 500]); %# Make figure
hAxes = axes('Parent',hFigure); %# Make axes
plot(hAxes,dataX,dataY); %# Plot the data
hold(hAxes,'on'); %# Subsequent plots won't replace existing data
end
With the above function saved to an m-file on your MATLAB path, you can make three copies of the figure by calling make_my_figure
three times with the same set of input data and storing the handles it returns in separate variables:
x = rand(1,100);
y = rand(1,100);
[hFigure1,hAxes1] = make_my_figure(x,y);
[hFigure2,hAxes2] = make_my_figure(x,y);
[hFigure3,hAxes3] = make_my_figure(x,y);
And you can add data to the axes of the second figure like so:
plot(hAxes2,rand(1,100),rand(1,100));