matlab刻度字体大小

发布时间 2023-07-07 21:35:16作者: 一杯明月

来源:https://blog.csdn.net/u010440456/article/details/90272382

方法一:在画完图的Figure窗口里,通过菜单Edit-Axes Properties....-Font-Font Size即可设置。

=================================================================

方法二:用plot命令画完图后,用如下命令:set(gca,'FontSize',20);即可完成菜单同样效果。

下面是既能改变坐标数字字体,又能改变坐标轴字体

figure(7);
subplot(2,1,2);
plot(time,u,'r');
xlabel('时间(秒)');ylabel('控制量输入');
set(gca,'FontSize',14); % 设置文字大小,同时影响坐标轴标注、图例、标题等。
set(get(gca,'XLabel'),'FontSize',14);%图上文字为8 point或小5号
set(get(gca,'YLabel'),'FontSize',14);
 
magnifyOnFigure   %局部放大上图
 
subplot(2,1,1);
plot(time,u,'r');
xlabel('时间(秒)');ylabel('控制量输入');
set(gca,'FontSize',14); % 设置文字大小,同时影响坐标轴标注、图例、标题等。
set(get(gca,'XLabel'),'FontSize',14);%图上文字为8 point或小5号
set(get(gca,'YLabel'),'FontSize',14);
 
set(gca,'FontName','Times New Roman','FontSize',14)设置坐标轴刻度字体名称,大小
 
%‘FontWeight’,’bold’ 加粗 ‘FontAngle’,’italic’ 斜体