Description Usage Arguments Examples
This is a modification of stat_ellipse to utilize a variety of robust estimators. This can be very useful for spotting bivariate outliers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
geom |
The geometric object to use display the data |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
cov.type |
a covariance function, preferably from the cvreg, ICS, ICSNP, MNM, or rrcov packages. |
cov.args |
a list with named arguments to pass to cov.type. |
level |
The coverage level at which to draw an ellipse. The default is 0.95 for a 95 pct coverage of the data points. Must be greater than 0.50. |
segments |
The number of segments to be used in drawing the ellipse. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
Other arguments passed on to |
1 2 3 4 | ggplot(faithful, aes(waiting, eruptions, color = eruptions > 3)) +
geom_point() +
stat_ellipse2(type = "mcd", linetype = 2) +
stat_ellipse2(type = "mgv")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.