Learn R Programming

netresponse (version 1.32.2)

add.ellipse: Add ellipse to an existing plot

Description

Calculates and plots ellipse corresponding to specified confidence interval in 2-dimensional plot

Usage

add.ellipse(centroid, covmat, confidence = 0.95, npoints = 100, col =
"black", ...)

Arguments

centroid
Vector with two elements defining the ellipse centroid.
covmat
Covariance matrix for the investigated data. Only diagonal covariances supported.
confidence
Confidence level determining the ellipse borders based on the covariance matrix.
npoints
Number of plotting points.
col
Color.
...
Other arguments to be passed.

Value

  • Used for plotting side effects.

Examples

Run this code
#add.ellipse(centroid = c(0, 0), covmat = diag(c(1,2)))

Run the code above in your browser using DataLab