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

View source: R/hull_plot.R

splitInTwoR Documentation

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
)

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.

Value

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


henna documentation built on Feb. 17, 2026, 9:08 a.m.