Description Usage Arguments See Also Examples
Calculates an elliptic fit of data as a ggplot2
layer. Calculated using MyEllipsefit::Ellipsefit
1 2 3 |
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. |
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 5 6 7 8 9 10 | mydata <- data.frame(x = c(5.92, 5.37, 3.16, 0.71, -0.29, -1.14, -0.8291667, 4.14, 10.74, 18.97, 21.66, 21.57, 21.56, 23.15, 24.17, 24.10, 23.26, 19.39, 12.31, 6.11, 7.49, 5.79, 2.66, 1.01),
y = c(0.14, 0.14, 0.10, 0.08, 0.08, 0.08, 0.12, 0.22, 0.36, 0.43, 0.42, 0.42, 0.43, 0.42, 0.37, 0.32, 0.26, 0.20, 0.12, 0.10, 0.14, 0.11, 0.07, 0.05))
library(ggplot2)
p <- ggplot(mydata, aes(x = x, y = y))
p <- p + geom_point()
p <- p + stat_myell()
p
# comparison with ggplot2:stat_ellipse
p + stat_ellipse(colour = "red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.