plot_axis_params.m
来自「基础程序」· M 代码 · 共 33 行
M
33 行
% plot_axis_params.m
% plot函数坐标轴参数的设置示例
% 绘制参数化的椭圆
t=[0:pi/50:2*pi]';
x=4*sin(t);
y=5*cos(t);
% 绘制一:normal
subplot(2,2,1);
plot(x,y);
axis normal;
grid on;
title('figure1: normal');
% 绘制二:equal
subplot(2,2,2);
plot(x,y);
axis equal;
grid on;
title('figure2: equal');
% 绘制三:image fill, box off(即边框消失)
subplot(2,2,3);
plot(x,y);
axis image fill;
box off;
grid on;
title('figure3: image fill, box off');
% 绘制四:tight, box off
subplot(2,2,4);
plot(x,y);
axis tight;
box off;
grid on;
title('figure4: tight, box off');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?