Learn R Programming

henna (version 0.3.4)

splitInTwo: Split the convex hull in two along an input line

Description

This function splits the convex hull in two along an input vertical or horizontal line.

Usage

splitInTwo(
  p,
  pointsDF,
  axisIntersect,
  pointCoords,
  borderPoints,
  legendLabs = paste0("Group ", seq(2)),
  alpha = 0.5
)

Value

A ggplot object showing the hull split in two parts along the input line.

Arguments

p

A ggplot object representing the hull.

pointsDF

A data frame with the x and y coordinates of the points.

axisIntersect

The coordinate where the vertical or horizontal line intersects the relevant axis.

pointCoords

The coordinates of the input points on the axis perpendicular to the input border line.

borderPoints

The points where the border line intersects the convex hull.

legendLabs

Legend labels.

alpha

Opaqueness level.