我想重用我在 Matlab 脚本中创建的图形。
fig1 = figure;
plot(...);
title(...);
% ...
% now I would like to plot fig1 again with a different title
% ...
% now I would like to plot fig1 again as a subplot in a 2x2 grid
如果没有代码重复,我怎么能做到这一点?
我可以使用图形对象吗?或者也许以某种方式保存绘图对象?