geom_mean_ellipse {ggtern} | R Documentation |
Mean Ellipse
Description
Produce ellipses from a mean and a variance of ternary compositional data, based off the function
included in the compositions
package.
Usage
geom_mean_ellipse(
mapping = NULL,
data = NULL,
stat = "MeanEllipse",
position = "identity",
...,
lineend = "butt",
linejoin = "round",
linemitre = 1,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
stat_mean_ellipse(
mapping = NULL,
data = NULL,
geom = "MeanEllipse",
position = "identity",
...,
steps = 72,
r = 1,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
Arguments
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
... |
Other arguments passed on to |
lineend |
Line end style (round, butt, square). |
linejoin |
Line join style (round, mitre, bevel). |
linemitre |
Line mitre limit (number greater than 1). |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom , stat |
Use to override the default connection between
|
steps |
the number of discretisation points to draw the ellipses |
r |
a scaling of the half-diameters |
Aesthetics
geom_MeanEllipse
understands the following aesthetics (required aesthetics are in bold):
x
y
alpha
colour
linetype
size
Computed variables
Same as stat_contour
Author(s)
Nicholas Hamilton & Ashton Drew
Examples
data(Feldspar)
ggtern(data=Feldspar,aes(An,Ab,Or)) +
geom_point() +
geom_mean_ellipse()
data(Feldspar)
ggtern(data=Feldspar,aes(Ab,An,Or)) +
theme_bw() +
stat_mean_ellipse(geom='polygon',steps=500,fill='red',color='black') +
geom_point()