torusAxis3d {sdetorus} | R Documentation |
Draws pretty axis labels for circular variables
Description
Wrapper for drawing pretty axis labels for circular variables.
To be invoked after plot3d
with axes = FALSE
and
box = FALSE
has been called.
Usage
torusAxis3d(sides = 1:3, twoPi = FALSE, ...)
Arguments
sides |
an integer vector specifying which side of the plot the axes are
to be drawn on. The axes are placed as follows: |
twoPi |
flag indicating that |
... |
further parameters passed to |
Details
The function calls box3d
.
Value
This function is usually invoked for its side effect, which is to add axes to an already existing plot.
Examples
if (requireNamespace("rgl")) {
n <- 50
x <- toPiInt(rnorm(n, mean = seq(-pi, pi, l = n), sd = 0.5))
y <- toPiInt(rnorm(n, mean = seq(-pi, pi, l = n), sd = 0.5))
z <- toPiInt(x + y + rnorm(n, mean = seq(-pi, pi, l = n), sd = 0.5))
rgl::plot3d(x, y, z, xlim = c(-pi, pi), ylim = c(-pi, pi),
zlim = c(-pi, pi), col = rainbow(n), size = 2,
box = FALSE, axes = FALSE)
torusAxis3d()
}
[Package sdetorus version 0.1.10 Index]