I have scatter plots saved in multiple matlab figure files, generated using a GUI built in Matlab. I would like to overlay one over the other.
I amusing the following code to overlay say figure 1 onto figure 2:
fh1 = open('1.fig');
ax1 = get(fh1, 'Children');
ax2 = get(fh2, 'Children');
ax2p = get(ax2(1),'Children');
I then export this figure as fig1_2 and then proceed to overlay fig 3 onto this combined figure using similar code. I always encounter the following issue:
Error using copyobj
Scatter cannot be a child of Legend.
Is there a solution to this other than manually exporting and plotting data?