Gun*_*uyf 64
使用saveas:
h=figure;
plot(x,y,'-bs','Linewidth',1.4,'Markersize',10);
% ...
saveas(h,name,'fig')
saveas(h,name,'jpg')
Run Code Online (Sandbox Code Playgroud)
这样,绘制了图形,并自动保存为".jpg"和".fig".您无需等待绘图出现,然后单击菜单中的"另存为".如果你需要绘制/保存很多数字,那就该去了.
如果你真的不想让情节出现(无论如何都必须加载,无法避免,否则也无需保存),你可以隐藏它:
h=figure('visible','off')
Run Code Online (Sandbox Code Playgroud)
Avi*_*ico 22
使用saveas函数时,分辨率不如使用文件 - >另存为...手动保存图形时,更强烈建议使用hgexport,如下所示:
hgexport(gcf, 'figure1.jpg', hgexport('factorystyle'), 'Format', 'jpeg');
Run Code Online (Sandbox Code Playgroud)
这与手动保存图形完全相同.
来源:http: //www.mathworks.com/support/solutions/en/data/1-1PT49C/index.html?product = SL&solution = 1-1PT49C
归档时间: |
|
查看次数: |
150073 次 |
最近记录: |