尝试摆弄轴的DataAspectRatio
和PlotBoxAspectRatio
属性,这也可以由pbaspect
和daspect
命令相应地控制。
例子
%// Plot surface
[X, Y] = meshgrid(-10:.1:10, -10:.1:10);
Z = 100 - X .^ 2 - Y .^ 2;
surf(X, Y, Z, 'EdgeColor', 'None')
%// Flatten the z-axis a bit
pbaspect([1 1 .2])
daspect([1 1 50])
原图:

平面图:
