简体   繁体   English

如何在 GNU Octave 中设置轴大小?

[英]How to set axis size in GNU Octave?

I am plotting a 3d surf plot in Octave and I want the z axis to be between 0 and 10. Can you please tell to to set axis to be between 2 values.我正在八度音阶中绘制 3d surf plot,我希望 z 轴介于 0 和 10 之间。请告诉我将轴设置为 2 个值之间。 The function ranges between 0 and 8 in z axis, but I want the z axis to be from 0 to 10. function 在 z 轴上的范围在 0 到 8 之间,但我希望 z 轴在 0 到 10 之间。

Use the zlim command.使用zlim命令。

zlim([0,10]);

Or, the axis command with 6 arguments, but in that case you'd have to specify limits for X and Y too.或者,带有 6 个 arguments 的轴命令,但在这种情况下,您也必须指定 X 和 Y 的限制。

Here's an example这是一个例子

t = 0 : 0.1 : pi * 12;
x = cos(t); y = sin(t); z = t / pi;
plot3( x, y, z );
zlim([0,20]);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM