Query or set the plot box aspect ratio of the current axes.
The aspect ratio is a normalized 3-element vector representing the rendered lengths of the x, y, and z axes.
pbaspect(mode)
Set the plot box aspect ratio mode of the current axes. mode is
either "auto"
or "manual"
.
pbaspect ("mode")
Return the plot box aspect ratio mode of the current axes.
pbaspect (hax, …)
Operate on the axes in handle hax instead of the current axes.
See also: axis, daspect, xlim, ylim, zlim.
The following code
clf; x = 0:0.01:4; plot (x,cos(x), x,sin(x)); pbaspect ([1 1 1]); title ("plot box is square");
Produces the following figure
Figure 1 |
---|
The following code
clf; x = 0:0.01:4;; plot (x,cos(x), x,sin(x)); pbaspect ([2 1 1]); title ("plot box aspect ratio is 2x1");
Produces the following figure
Figure 1 |
---|
The following code
clf; x = 0:0.01:4; plot (x,cos(x), x,sin(x)); daspect ([1 1 1]); pbaspect ([2 1 1]); title ("plot box is 2x1, and axes [0 4 -1 1]");
Produces the following figure
Figure 1 |
---|
Package: octave