axisB = gca; % axis object for plot B
axisB.Units = 'pixels'; % or other absolute unit. Default is relative to figure
现在点击Plot A来选择它:
axisA = gca;
axisA.Units = 'pixels'; % set to same unit as axisB
dHeight = axisA.Position(4) - axisB.Position(4);
axisA.Position(4) = axisB.Position(4); % set height of axisA to that of axisB
1 回答
您可以设置轴对象的大小,因此将绘图A的轴大小更改为绘图B的轴大小 .
单击Plot B选择它:
现在点击Plot A来选择它:
(可选)您可以减小绘图A的图形大小,因此它看起来更好: