aspect3d {rgl} | R Documentation |
This function sets the apparent ratios of the x, y, and z axes of the current bounding box.
aspect3d(x, y = NULL, z = NULL)
x |
The ratio for the x axis, or all three ratios, or "iso" |
y |
The ratio for the y axis |
z |
The ratio for the z axis |
If the ratios are all 1, the bounding box will be displayed as a cube approximately filling the display.
Values may be set larger or smaller as desired. Aspect "iso"
signifies that the
coordinates should all be displayed at the same scale, i.e. the bounding box should not be
rescaled. (This corresponds to the default display before aspect3d
has been called.)
Partial matches to "iso"
are allowed.
This function works by modifying the userMatrix
to adjust the modelMatrix
,
so it must be applied after other functions (e.g. par3d
, view3d
or rgl.viewpoint
)
that set the userMatrix
.
The previous value of the userMatrix
is returned.
Duncan Murdoch
x <- rnorm(100) y <- rnorm(100)*2 z <- rnorm(100)*3 open3d() plot3d(x, y, z) aspect3d(1,1,0.5) open3d() plot3d(x, y, z) aspect3d("iso")