View source: R/geom_xy_means.R
geom_xy_means | R Documentation |
Place point at mean of x and mean of y
geom_xy_means(
mapping = NULL,
data = NULL,
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
...
)
... |
library(ggplot2)
ggplot(cars) + aes(x = speed, y = dist) +
geom_point() + geom_xy_means(size = 5) + aes(color = speed > 15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.