cov2Ellipse: Construct an Ellipse

View source: R/cov2Ellipse.R

cov2EllipseR Documentation

Construct an Ellipse

Description

Constructs an ellipse from a covariance matrix.

Usage

cov2Ellipse(cov, center, scale = 1, n = 151)

Arguments

cov

the 2-dimenstional covariance matrix, representing x and y.

center

the means of x and y.

scale

the size of the ellipse in units of standard deviation.

n

the number of points in the returned data.

Value

A list containing the x- and y-coordinates of the ellipse.

See Also

dataEllipse

Examples

# make a few points on a unit circle
TMP <- cov2Ellipse(matrix(c(1,0,0,1), ncol=2), c(0,0), n=5)
# Pretty print the data
lapply(TMP, zapsmall)

USGS-R/smwrGraphs documentation built on Oct. 11, 2022, 6:11 a.m.