handles.f = figure;
handles.axes1 = subplot(211);
handles.axes2 = subplot(223);
handles.axes3 = subplot(224);
plot(handles.axes1,rand(5));
imagesc(handles.axes2,rand(10,10));
title(handles.axes2, 'My IMAGESC');
xlabel(handles.axes2,'X values');
ylabel(handles.axes2,'Y values');
surf(handles.axes3,peaks);
outputFileName = 'test.fig';
fignew = figure('Visible','off');
newAxes = copyobj(handles.axes2,fignew);
set(newAxes,'Position',get(groot,'DefaultAxesPosition'));
set(fignew,'CreateFcn','set(gcbf,''Visible'',''on'')');
savefig(fignew,'test.fig');
delete(fignew);
Best Answer