Description Usage Arguments See Also Examples
Convex hull are very similar to polygons (as drawn by geom_polygon) except that only points forming the outside contour are connected by the shape. This function is only a wrapper around R's original chull function
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 |
stat |
The statistical transformation to use on the data for this layer, as a string. |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
... |
other arguments passed on to |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
1 2 3 4 5 6 7 8 9 10 | n <- 10
test_df <- data.frame(
a = runif(n),
b = runif(n)
)
library(ggplot2)
ggplot(test_df, aes(x = a,y = b)) +
geom_point() +
geom_convexhull(alpha = 0.7, fill = "red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.