Create new axes to match a template
You could treat N1_0D.fig as a template by opening the figure, clearing all of the axes and filling them with new data.
templateFig = 'N1_0D.fig';
templateHand = open(templateFig);
axHand = findall(templateHand, 'Type', 'axes');
arrayfun(@cla,axHand)
contourf(axHand(1), . . .)
contourf(axHand(2), . . .)
contourf(axHand(3), . . .)
contourf(axHand(4), . . .)
Alter existing axes to match a template
templateFig = 'N1_0D.fig';
templateHand = open(templateFig);
axHand = findall(templateHand, 'Type', 'axes');
cbHand = findall(templateHand, 'Type', 'ColorBar');
axPos = get(axHand,'Position');
cbPos = get(cbHand,'Position');
targetFig = 'NT_0D.fig';
targetHand = open(targetFig);
targetHand.Position = templateHand.Position;
targAxHand = findall(targetHand, 'Type', 'axes');
targcbHand = findall(targetHand, 'Type', 'ColorBar');
set(targAxHand, {'Position'}, axPos)
set(targcbHand, {'Position'}, cbPos)
Best Answer