|
有两种方法:
1,用copyobj配合saveas,适合单幅图
new_fig_handle=figure('visible','off'); %设为不可见
new_axes = copyobj(fig1.axes2,new_fig_handle); %fig1是传递进来的handle参数
set(new_axes,'Units','normalized','Position',[0.1 0.1 0.8 0.8]); %将图线缩放
set(new_fig_handle, 'InvertHardCopy', 'off'); %可以把自带背景色也保存下来
saveas(new_fig_handle,fig2_name);
2,用print函数来保存图,适合subplot绘制
Copyright ©2011-2014 bbs.06climate.com All Rights Reserved. Powered by Discuz! (京ICP-10201084)
本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论