geom_ord_ellipse: add confidence ellipse to ordinary plot

Description Usage Arguments Value Author(s) Examples

View source: R/geom_ord_ellipse.R

Description

add confidence ellipse to ordinary plot produced by ggord

Usage

1
geom_ord_ellipse(mapping = NULL, ellipse_pro = 0.97, fill = NA, ...)

Arguments

mapping

aes mapping

ellipse_pro

confidence value for the ellipse

fill

color to fill the ellipse, NA by default

...

additional parameters

Value

ggplot layer

Author(s)

Guangchuang Yu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(MASS)
ord <- lda(Species ~ ., iris, prior = rep(1, 3)/3)
## devtools::install_github('fawda123/ggord')
library(ggord)
p <- ggord(ord, iris$Species)
p + geom_ord_ellipse(ellipse_pro = .96, color='firebrick', size=1, lty=3) +
geom_ord_ellipse(ellipse_pro = .99, lty=2)

## End(Not run)

GuangchuangYu/gglayer documentation built on April 7, 2020, 9:35 a.m.