scat3d: 3D scatterplot adapted from a function by J. Fox

Description Usage Arguments Value Author(s) See Also Examples

View source: R/scat3d.R

Description

Draws a 3D scatterplot with a variety of graphical enhancements, allowing multiple groups, data ellipsoids and a variety of fitted response surfaces to be displayed.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
scat3d(x, y, z, 
	xlab = deparse(substitute(x)), ylab = deparse(substitute(y)), zlab = deparse(substitute(z)), 
	xtend = 0.05, debug = TRUE, xlim = xrange(x, xtend), ylim = xrange(y, xtend), zlim = xrange(z, xtend), 
	revolutions = 0, 
	col = "yellow", bg.col = c("white", "black"), axis.col = if (bg.col == "white") "black" else "white", 
	surface.col = c("blue", "green", "orange", "magenta", "cyan", "red", "yellow", "gray"), 
	neg.res.col = "red", pos.res.col = "green", point.col = col, text.col = axis.col, 
	grid.col = if (bg.col == "white") "black" else "gray", fogtype = c("none", "exp2", "linear", "exp"), 
	residuals = (length(fit) == 1), surface = FALSE, fill = TRUE, grid = TRUE, grid.lines = 26, 
	df.smooth = NULL, df.additive = NULL, sphere.size = 1, threshold = 0.01, speed = 1, fov = 30, 
	fit = "linear", groups = NULL, parallel = TRUE, ellipsoid = FALSE, var = FALSE, level = 0.5, 
	model.summary = FALSE, verbose = 0, clear = TRUE, pow = -1, origin = FALSE, axes = TRUE)

Arguments

x,y,z

Numeric vectors of the same length. Only complete cases will be plotted and used in other calculations

xlab, ylab, zlab

Labels for the respective axes

xtend

Amount to extend each axis beyond the axis limits

debug
xlim,ylim,zlim

Limits for the respective axes

revolutions
col
bg.col
axis.col
surface.col
neg.res.col
pos.res.col
point.col
text.col
grid.col
fogtype
residuals
surface

Logical, indicating whether fitted surface(s) should be added to the plot, as given by fit.

fill
grid
grid.lines
df.smooth

Degrees of freedom for "smooth" fit

df.additive

Degrees of freedom for "additive" fit

sphere.size
threshold
speed
fov
fit

A character vector containing one or more of c("linear", "quadratic", "smooth", "additive")

groups
parallel
ellipsoid
var
level
model.summary

Logical: display fitted model summaries at end?

verbose
clear
pow
origin

Logical: include the origin in the plot frame?

axes

Value

Returns model summaries if model.summary=TRUE, otherwise NULL

Author(s)

Georges Monette

See Also

Plot3d, ~~~

Examples

1
2
3
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

p3d documentation built on May 2, 2019, 5:25 p.m.