I have three separate figure files that consist of multiple plots, but with only one legend entry each. This is because each figure consists of multiple lines of the same color.
In order to overlay each of these figures into a single figure, I input:
% Load saved figureshgload('design_1.fig');hgload('design_2.fig');hgload('baseline.fig');% Identify figuresfig1 = findobj(1,'Type','Axes');leg1 = legend(fig1,'Design 1');fig2 = findobj(2,'Type','Line');leg2 = legend(fig2,'Design 2');fig3 = findobj(3,'Type','Line');leg3 = legend(fig3,'Baseline');% Combine figurescopyobj(fig2,fig1);copyobj(fig3,fig1);
However, when I do this, the legend has many extraneous entries corresponding to the lines that should not be labeled. I want my legend to only have 3 entries, exactly one from each figure. Any advice?