0
我指的是這個問題 here。如何從合併兩個數字中刪除第三個圖例
我的問題是,在第三個圖中我創建了(其中有2個數字)有3個傳奇。2是好的,但有一個第三個傳說(這是圖1或圖2的傳說)。 如何以編程方式擦除它?
fig1=open('fig1.fig');
fig2=open('fig2.fig');
ax1=get(fig1,'Children');
ax2=get(fig2,'Children');
for i = 1 : numel(ax2)
ax2Children = get(ax2(i),'Children');
tri=get(ax1(i),'Children');
hold on;
first=copyobj(tri, ax1(i));
second=copyobj(ax2Children, ax1(i));
end
set(first,'color','g','marker','o');
set(second,'color','b','marker','x');
legend(first, {'first'}, 'Location','NorthWest', 'Color','g');
legend(second, {'second'}, 'Location','NorthWest', 'Color','b');
謝謝!