赞
踩
set(gcf,'unit','centimeters','position',[10 5 7 4.3])
【8.5 5】为指定输出图片宽和高 cm
【10 5】为指定输出图片位置
根据word中插图单双栏,可设置成【7 4.3】(双栏),【14 8.6】(单栏)
- amax = [ 0.1;0.198;1.191] ;
- arms = [0.023;0.085;0.315 ] ;
-
- X = categorical({'RMS(Y)','MAX(Y)'});
- X = reordercats(X,{'RMS(Y)','MAX(Y)'});
- % x = [1 2];
- vals = [arms,amax];
- b = bar(X,vals,1);
-
- xtips1 = b(1).XEndPoints;
- ytips1 = b(1).YEndPoints;
- labels1 = string(b(1).YData);
- text(xtips1(1)-0.05,ytips1(1),labels1(1),'HorizontalAlignment','center','VerticalAlignment','bottom')
- text(xtips1(2),ytips1(2),labels1(2),'HorizontalAlignment','center','VerticalAlignment','bottom')
- xtips2 = b(2).XEndPoints;
- ytips2 = b(2).YEndPoints;
- labels2 = string(b(2).YData);
- text(xtips2-0.06,ytips2+0.05,labels2,'HorizontalAlignment','center','VerticalAlignment','bottom')
- xtips2 = b(3).XEndPoints;
- ytips2 = b(3).YEndPoints;
- labels2 = string(b(3).YData);
- text(xtips2,ytips2,labels2,'HorizontalAlignment','center','VerticalAlignment','bottom')
输出尺寸【14 8.6】
- legend('30km/h','50km/h','80km/h','fontsize',12)
- xlabel('时间t/s','fontsize',15,'FontWeight','bold');
- ylabel('前轮转角/(deg)','fontsize',15,'FontWeight','bold');
- set(gcf,'unit','centimeters','position',[10 5 14 8.6])
- box off
- ylim([-12 10])
- xlim([0 20])
输出尺寸【7 4.12】
legend 字体 8
xy label 字体10
线宽 2.5
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。