auto_3d: Auto aspect ratio

View source: R/auto_3d.R

auto_3dR Documentation

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

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.

Value

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

Examples

topo <- copy_down(silicate::SC(simpleworld), gebco)
plot3d(topo)
## update aspect ratio to be an apparent cube, not a needle
auto_3d()

hypertidy/rangl documentation built on Nov. 24, 2022, 10:29 p.m.