打开.fig文件并删除一些绘图条目-Matlab

Open .fig file and delete some of the plot entries-Matlab

我将以下图像存储为 f7.fig。我想再次打开它并删除除第一个(红色)、第二个(蓝色)和最后一个(青色)之外的所有其他条目。我还想从图例中删除它们。这可能吗?

一个简单的交互方法是这样的:

savefig(h, 'somefig.fig`); % Save figure
% Close the figure ...
openfig('somefig.fig'); % Open figure
% Click on the curves you wanted to delete ....
delete(gco); % delete object -> this takes care of the legend too
% Click on the curves you wanted to delete ....
delete(gco); 
% so on...

这种方法here也是一种替代方法。