draw_convexhull: Drawing the Convex Hull

View source: R/draw.R

draw_convexhullR Documentation

Drawing the Convex Hull

Description

This function will draw the Convex Hull for a scatterplot.

Usage

draw_convexhull(x, y, alpha = 0.5, clr = "black", fill = FALSE, out.rm = TRUE)

Arguments

x

numeric vector

y

numeric vector

alpha

transparency value of points

clr

optional colour of points and lines, default black

fill

Fill the polygon

out.rm

option to return the outlier removed convex hull

Value

A "gg" object that draws the plot's convex hull.

Examples

require(dplyr)
require(ggplot2)
data("features")
nl <- features %>% filter(feature == "clusters")
draw_convexhull(nl$x, nl$y, fill=TRUE, out.rm=FALSE)

cassowaryr documentation built on Aug. 9, 2022, 5:08 p.m.