Matlab的figure常用属性设置

时间:2024-02-15 11:50:03

Matlab plot画图坐标字体、字号、范围等设置-百度经验
https://jingyan.baidu.com/article/ae97a646013e05bbfd461d0b.html

figure()

x=0:0.2:8;

plot(x,sin(x),\'-k\', \'LineWidth\',2);

set(gca,\'linewidth\',2,\'fontsize\',30,\'fontname\',\'Times\');  %% 线宽 字号 字体

legend(\'sinx\'); %%图例

xlabel(\'x\',\'Fontname\', \'Times New Roman\',\'FontSize\',12); %% x坐标,显示内容,字号,字体

set(gca,\'XTick\',[0:2:8]) %¸ %改变x轴坐标间隔显示

 

坐标区的外观和行为 - MATLAB - MathWorks 中国
https://ww2.mathworks.cn/help/matlab/ref/matlab.graphics.axis.axes-properties.html