Ell3d: Add ellipsoid(s) to a 3D plot

View source: R/Ell3d.R

Ell3dR Documentation

Add ellipsoid(s) to a 3D plot

Description

Adds data ellipsoids(s) to a 3D plot using, by default, the data frame for the plot. Note: The argument list of Ell3d has changed. This documentation should be regenerated and revised.

Usage

Ell3d(x, ...)
## Default S3 method:
Ell3d(x, radius = 1, col, alpha = 0.5, use.groups = pars$has.groups, 
    verbose = 0, 
    partial = NULL, partial.col = "black", partial.lwd = 1, partial.alpha = 1, 
    partial.offset = 0,
    ...) 

Arguments

x

optional matrix or data frame used to generate a data ellipsoid. The default is the data frame stored in Plot3d.par() when the plot was created. If x is a data frame, then Ell3d uses the dispersion ellipse for the plotted variable names in the data frame. Thus Plot3d(subset( data, Sex == 'male'), has.groups = FALSE) will draw a dispersion ellipse for a selected subgroup provided the plotted variable names exist in data.

col

color for ellipsoid, by default: Plot3d.par()$col.

radius

of the ellipsoid (1 generates the standard ellipsoid whose one dimensional projections yield the mean plus or minus one standard deviation of the variable projected.

use.groups

defaults to Plot3d.par()has.groups: whether to plot one ellipsoid for all the data or separate ellipsoids for each subgroup.

alpha

default 0.5. Controls transparency of ellipsoid.

verbose

be verbose?

partial

default NULL. Controls the display of conditional ellipsoids, i.e. the slice through a central plane of the ellipsoid: 1: saggital plane, 2: transverse plane, 3: frontal (or coronal) plane.

partial.offset

the default, 0, draws an ellipse at the centre of the ellipsoid. Values between -1 and 1 draw an ellipse around a point that is that portion of the distance towards the edge of the ellipsoid.

...

other arguments passed down

Value

None

Author(s)

Georges Monette

See Also

Plot3d, ~~~

Examples

## Not run: 
library(p3d)
library(car)

Init3d()
Plot3d( women ~ education + prestige | type, Prestige)
Ell3d()
Ell3d( subset(Prestige, income > 5000), col = 'pink', alpha = .3)


## End(Not run)

gmonette/p3d documentation built on Nov. 16, 2023, 11:31 p.m.