You can use copyobj() to copy the content on the external axis on to your UIAxis. This will not copy axis labels, titile, or legends but those items can be copied separately.
Step 1 is to open your external figure and get the axis handle. I'm assuming there is only 1 axis on the figure, otherwise this will need to be adapted to get the handle of the specific axis being copied.
fig = openfig('storage/psychplot_base.fig', 'invisible');
ax = findobj(fig,'Type','Axes');
Step 2 is to copy the children of the external axes to the app's UIAxes.
copyobj(ax.Children, app.UIAxes)
Step 3 is to delete the external figure
Best Answer