matlab图片参数设置及导出(符合论文要求) |
您所在的位置:网站首页 › 论文打印的要求怎么写的好一点 › matlab图片参数设置及导出(符合论文要求) |
1. 图片的设置
我用matlab出图一般设置几个文件设置参数,放在Visulization文件夹。 以三维图为例 axes_setting.m set(gca, ... 'Xlim', [-0.5,0.5],... 'Ylim', [-0.5,0.5],... 'Zlim', [0,1],... 'DataAspectRatio', [1,1,1]); set(gca, ... 'Box', 'on',... 'BoxStyle', 'back'); set(gca, ... 'XTickLabelRotation', 0,... 'YTickLabelRotation', 0,... 'ZTickLabelRotation', 0); set(gca, ... 'View', [65,30]); set(gca, ... 'LineWidth', 1); % font set(gca, ... 'FontWeight', 'bold'); set(gca, ... 'XTick', [-0.5 -0.25 0 0.25 0.5],... 'YTick', [-0.5 -0.25 0 0.25 0.5],... 'ZTick', [0 0.25 0.5 0.75 1]); fig_setting.m set(gcf,'Color','#ffffff'); label_setting.m hXLabel=get(gca,'XLabel') hYLabel=get(gca,'YLabel'); hZLabel=get(gca,'ZLabel'); set(hXLabel, ... 'String', 'X(m)',... 'FontSize', 12); set(hYLabel, ... 'String', 'Y(m)',... 'FontSize', 12); set(hZLabel, ... 'String', 'Z(m)',... 'FontSize', 12); line_setting.m set(hfig, ... 'LineStyle', '-',... 'Color', '#D9541A',... 'LineWidth', 2); title_setting.m htitle=title('螺旋线'); set(htitle, ... 'FontWeight', 'bold',... 'FontSize', 12); 2. 测试代码展示代码量很少。 figure; fig_setting t=0:0.1:10; x=0.5*cos(pi*t); y=0.5*sin(pi*t); z=0.1*t; hfig=plot3(x',y',z'); line_setting; axes_setting; label_setting; title_setting就很规整
我导出设置如下(宽度可以大一点,字不会那么挤,在论文可以缩放,比如我用LaTex,可以设置图的宽度等于\linewidth——使用LaTec导入图片参考我的这篇文章LaTex使用技巧14:插入eps图片)
可以保存设置,下次继续使用,非常方便,比如我设置名字为论文,点击保存。
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |