allspan3D: Plot Span and Vectors in 3D

View source: R/coord3D.R

allspan3DR Documentation

Plot Span and Vectors in 3D

Description

Plot the span of a matrix plus any vectors in a 3D plot at one or more angles. A plot is produced for each entry of th.

Usage

allspan3D(M, V = NULL, th = c(-90, -45, 0, 45, 90, 135), V2 = NULL, col = NULL)

Arguments

M

Matrix for which the span should be shown.

V

Either NULL, a vector of length 3, or a matrix with each column a vector of length 3.

th

A vector indicating the horizontal angle at which the plot should be shown.

V2

A matrix or vector of the same dimensions as M indicating the starting points of the vectors in M (default is the origin for all).

col

Vector colors; if entered, must have a value for each vector.

Value

No return value, called for side effects

Examples

M=matrix(c(1,2,4,3,0,2),3)
oldpar <- par(mfrow=c(3,2))
allspan3D(M,cbind(M,M[,1]-M[,2]),V2=matrix(c(rep(0,6),M[,2]),3),col=c(2,2,1))
par(oldpar)

smallstuff documentation built on June 2, 2022, 5:06 p.m.