Description Usage Arguments Examples
View source: R/j_geom_c_hull.R
Percentage labels the are filled according to proportion where total in x is denominator
1 2 3 4 5 6 7 8 9 |
... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(ggplot2)
library(magrittr)
chull(cars$speed, cars$dist) %>% # index of rim points
cars[.,] ->
cars_c_hull_rows
ggplot(data = cars) +
aes(x = speed) +
aes(y = dist) +
geom_point() +
geom_polygon(data = cars_c_hull_rows,
alpha = .5
)
ggplot(data = cars) +
aes(x = speed) +
aes(y = dist) +
geom_point() +
j_geom_c_hull(alpha = .5) +
aes(color = speed >= 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.