Santiago Barreda Assistant Professor, Department of Linguistics, UC Davis
Main Research Vignettes CV phonTools Statistics Links

## sdellipse [phonTools]

This function may be used in 2 diffierent ways:   1) To draw standard deviation ellipses around a set of observations (if 'means' is not specified)   2) To draw ellipses/circles on plots (if 'means' is specified).

Code used to generate examples:

```
## alternatively, a covariance matrix may be specified directly.
par (mfrow = c(2,2), mar = c(4,4,1,1))

## draw random points
draws = rmvtnorm (n = 1000, k = 2, sigma = .3)
plot (draws)
## draw standard deviation ellipses
sdellipse (draws, stdev = 3, lwd = 3, col = 2)

## draw random points
draws = rmvtnorm (n = 1000, k = 2, sigma = -.3)
plot (draws)
## draw standard deviation ellipses
sdellipse (draws, stdev = 3, lwd = 3, col = 2)

## draw an ellipse
sdellipse (matrix(c(1,.5,.5,1),2,2), means = c(5,-3), add = FALSE, stdev = 1)
## draw a circle
sdellipse (matrix(c(4,0,0,4),2,2), means = c(-100,17), add = FALSE, stdev = 1)

```