axis3d: Drawing a 3D coordiante system to a plot, based on package...

axis3DR Documentation

Drawing a 3D coordiante system to a plot, based on package rgl

Description

Adds a coordinate system to a 3D rgl graphic. In future releases, functionality to add tickmarks will be (hopefully) provided. Now, it is just a system of arrows giving the directions of the three axes.

Usage

axis3D(axis.origin=c(0,0,0),axis.scale=1,axis.col="gray",vlabs=c("x","y","z"),
       vlabs.col=axis.col,bbox=FALSE,axis.lwd=2,axis.len=mean(axis.scale)/10,
       axis.angle=30,orth=c(1,0.0001,0.000001),axes=TRUE,...)

Arguments

axis.origin

The location where to put the origin of the coordinate arrows typicall either 0, the minimum or the mean of the dataset

axis.scale

either a number or a 3D vector giving the length of the arrows for the axis in the coordiantes of the plot

axis.col

Color to plot the coordinate system

vlabs

The names of the axes, plotted at the end

vlabs.col

color for the axes labels

bbox

boolean, whether to plot a bounding box

axis.lwd

line width of the axes

axis.angle

angle of the arrow heads

axis.len

length of the arrow heads

orth

the orth argument of arrows3D

axes

a boolean, wether to plot the axes

...

these arguments are passed to arrows3D as rgl::material3d arguments

Details

The function is called to plot a coordiante system consisting of arrows into an rgl plot.

Value

Nothing

Author(s)

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

See Also

rgl::points3d, graphics::plot, plot3D,arrows3D

Examples

x <- cbind(rnorm(10),rnorm(10),rnorm(10))
if(requireNamespace("rgl", quietly = TRUE)) {
  plot3D(x)
  x0 <- x*0
  axis3D()
} ## this function requires package 'rgl'

compositions documentation built on June 22, 2024, 12:15 p.m.