Convex hull plot type

Description

Type function for drawing convex hulls around grouped points. Uses chull to compute the convex hull of each group and draws the result as a polygon.

Usage

type_chull(density = NULL, angle = 45)

Arguments

density the density of shading lines, in lines per inch. The default value of NULL means that no shading lines are drawn. A zero value of density means no shading nor filling whereas negative values and NA suppress shading (and so allow color filling).
angle the slope of shading lines, given as an angle in degrees (counter-clockwise).

Examples

library("tinyplot")

# "chull" type convenience character string
tinyplot(Sepal.Length ~ Petal.Length | Species, data = iris, type = "chull")

# layer filled convex hull(s) on top of points
tinyplot(Sepal.Length ~ Petal.Length | Species, data = iris, theme = "basic")
tinyplot_add(type = "chull", fill = 0.2)