Matlab 两个图中y轴方向上的相同单位
假设:Matlab 两个图中y轴方向上的相同单位,matlab,equals,axes,Matlab,Equals,Axes,假设: x=1:10; y=x.^2; h(1)=subplot(3,1,1:2); plot(x,y); h(2)=subplot(3,1,3); plot(x,y); 我想知道是否有办法在两个图的y轴方向上使用相同的数据单元,例如缩短上图的y轴,使其与下图的y轴相等 提前非常感谢你, Werner正如Dev iL已经指出的那样。示例代码可以是 x=1:10; y=x.^2;%First Output z=x.^1.5;%Another output figure h(1)=subpl
x=1:10;
y=x.^2;
h(1)=subplot(3,1,1:2);
plot(x,y);
h(2)=subplot(3,1,3);
plot(x,y);
我想知道是否有办法在两个图的y轴方向上使用相同的数据单元,例如缩短上图的y轴,使其与下图的y轴相等
提前非常感谢你,
Werner正如Dev iL已经指出的那样。示例代码可以是
x=1:10;
y=x.^2;%First Output
z=x.^1.5;%Another output
figure
h(1)=subplot(2,1,1);
plot(x,y);
grid 'on'
h(2)=subplot(2,1,2);
plot(x,z);
grid 'on'
linkaxes([h(2) h(1)],'y');
看见