Learn R Programming

anglr (version 0.7.0)

auto_3d: Auto aspect ratio

Description

Automatically modify the aspect ratio of a scene to rescale drastically different data ranges into a cube.

Usage

auto_3d(...)

Arguments

...

unused, check for input of arguments which are ignored with a message

Value

the original value of rgl::par3d() before update

Details

This is a simple alias to rgl::aspect3d(1).

This is typically used to rescale data in different units, for example longitude and latitude in degrees and elevation in metres.

Note that running rgl::aspect3d("iso") which show the realistic ratio of the plot axes, ignoring units. Running this function is equivalent to rgl::aspectd(1) (or rgl::aspect(x = 1, y = 1, z = 1)) which sets the apparent ratios of the current bounding box.

Examples

Run this code
# NOT RUN {
topo <- copy_down(silicate::SC(simpleworld), gebco)
plot3d(topo)
## update aspect ratio to be an apparent cube, not a needle
auto_3d()
# }

Run the code above in your browser using DataLab