plot {rotations} | R Documentation |
Visualizing random rotations
Description
This function produces a static three-dimensional globe onto
which one of the columns of the provided sample of rotations is projected.
The data are centered around a user-specified rotation matrix. The static
plot uses ggplot2
. Interactive plots are no longer supported.
Usage
## S3 method for class 'SO3'
plot(
x,
center = mean(x),
col = 1,
to_range = FALSE,
show_estimates = NULL,
label_points = NULL,
mean_regions = NULL,
median_regions = NULL,
alp = NULL,
m = 300,
interactive = FALSE,
...
)
## S3 method for class 'Q4'
plot(
x,
center = mean(x),
col = 1,
to_range = FALSE,
show_estimates = NULL,
label_points = NULL,
mean_regions = NULL,
median_regions = NULL,
alp = NULL,
m = 300,
interactive = FALSE,
...
)
Arguments
x |
n rotations in |
center |
rotation about which to center the observations. |
col |
integer or vector comprised of 1, 2, 3 indicating which column(s)
to display. If |
to_range |
logical; if |
show_estimates |
character vector to specify which of the four estimates of the principal direction to show. Possibilities are "all", "proj.mean", "proj.median", "geom.mean", "geom.median". |
label_points |
vector of labels. |
mean_regions |
character vector to specify which of the three confidence regions to show for the projected mean. Possibilities are "all", "trans.theory","trans.bootstrap, "direct.theory", "direct.bootstrap". |
median_regions |
character vector to specify which of the three confidence regions to show for the projected median. Possibilities are "all", "theory", "bootstrap." |
alp |
alpha level to be used for confidence regions. See
|
m |
number of bootstrap replicates to use in bootstrap confidence regions. |
interactive |
deprecated; |
... |
parameters passed onto the points layer. |
Value
A visualization of rotation data.
Examples
r <- rvmises(200, kappa = 1.0)
Rs <- genR(r)
plot(Rs, center = mean(Rs), show_estimates = "proj.mean", shape = 4)
# Z is computed internally and contains information on depth
plot(
Rs,
center = mean(Rs),
show_estimates = c("proj.mean", "geom.mean"),
label_points = sample(LETTERS, 200, replace = TRUE)
) +
ggplot2::aes(size = Z, alpha = Z) +
ggplot2::scale_size(limits = c(-1, 1), range = c(0.5, 2.5))