Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot3drmult

plot in 3D based on rgl


Description

3-dimensional plots, which can be rotated and zoomed in/out

Usage

## S3 method for class 'rmult'
plot3D(x,parts=1:3,...,
                 center=FALSE,scale=FALSE,add=FALSE,axes=!add,
                 cex=2,vlabs=colnames(x),size=cex,bbox=FALSE,col=1)

Arguments

x

an object to be plotted, e.g. a data frame or a data matrix

parts

the variables in the rmult object to be plotted

...

additional plotting parameters as described in rgl::rgl.material

center

logical, center the data? This might be necessary to stay within the openGL-arithmetic used in rgl.

scale

logical, scale the data? This might be necessary to stay within the openGL-arithmetic used in rgl.

add

logical, adding or new plot

bbox

logical, whether to add a bounding box

axes

logical, whether to plot a coordinate cross

cex

size of the plotting symbol (as expanding factor)

vlabs

labels for the variables

size

size of the plotting symbol, only size or cex should be used

col

the color used for dots, defaults to black.

Details

The function provides a generic interface for 3-dimensional plotting in analogy to the 2d-plotting interface of plot, using rgl package.

Value

the 3D plotting coordinates of the objects displayed, returned invisibly

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

See Also

kingTetrahedron rgl::points3d, graphics::plot, plot3D,

Examples

x <- cbind(rnorm(10),rnorm(10),rnorm(10))
data(SimulatedAmounts)
if(requireNamespace("rgl", quietly = TRUE)) {
  plot3D(x)
  plot3D(rmult(sa.lognormals),cex=4,col=1:nrow(sa.lognormals))
} ## this function requires package 'rgl'

compositions

Compositional Data Analysis

v2.0-1
GPL (>= 2)
Authors
K. Gerald van den Boogaart <boogaart@hzdr.de>, Raimon Tolosana-Delgado, Matevz Bren
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.