我已发现在网(http://www.mathworks.com/matlabcentral/newsreader/view_thread/322200)export_fig,GUI和GCF - Matlab的2015B
[fileName filePath] = uiputfile('*.jpg','Save As');
if filePath == 0
return;
end
saveFileAs = ([filePath fileName]);
addpath('export_fig')
export_fig(handles.axes1,saveFileAs);
set(gcf, 'Color', 'w');
我用它在Matlab GUI(通过按钮)下面的代码。我的问题是我需要设置(gcf,'颜色','w')线,因为我删除它,一切看起来不错?它有什么作用?
感谢
['set']的文档(http://www.mathworks.com/help/matlab/ref/set.html),['gcf'](http://www.mathworks.com/help /matlab/ref/gcf.html)和['figure' properties](http://www.mathworks.com/help/matlab/ref/figure-properties.html#property_color)将是很好的地方此信息... – excaza