% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hull_plot.R
\name{hullPlot}
\alias{hullPlot}
\title{Plot the convex hull of a set of points}
\usage{
hullPlot(
  pointsDF,
  title = NULL,
  xInt = NULL,
  yInt = NULL,
  palette = hpColors(),
  lineColor = "navy",
  lineWidth = 0.3,
  lineType = c("dashed", "solid", "dotted", "dotdash", "longdash", "twodash"),
  hullWidth = 0,
  xLab = NULL,
  yLab = NULL,
  legendLabs = paste0("Group ", seq(4)),
  pointSize = 1,
  pointShape = 4,
  alpha = 0.2,
  labeledPoints = NULL,
  labelOutside = FALSE,
  labXThr = NULL,
  labYThr = NULL,
  labelType = c("free", "boxed"),
  labelSize = 2.5,
  labelColor = "black",
  labelRepulsion = 1,
  labelPull = 0,
  maxOverlaps = 10,
  legendPos = "bottom",
  legendTextSize = 10,
  axisTextSize = 12,
  axisTitleSize = 12,
  ...
)
}
\arguments{
\item{pointsDF}{A data frame with the x and y coordinates of the points.}

\item{title}{Plot title.}

\item{xInt}{The coordinate where the vertical line intersects the x axis.}

\item{yInt}{The coordinate where the horizontal line intersects the y axis.}

\item{palette}{Color palette.}

\item{lineColor}{The color of the horizontal and vertical dividing lines,
if provided. If \code{NULL}, no dividing lines will be drawn, though the
hull will still be split along these lines if \code{xInt}
and/or \code{yInt}are not \code{NULL}.}

\item{lineWidth}{The width of the horizontal and vertical dividing lines.
Ignored if \code{lineColor} is \code{NULL}.}

\item{lineType}{The type of the horizontal and vertical dividing lines.
Choose between 'dashed','solid', 'dotted', 'dotdash', 'longdash' and
'twodash'. Default is 'dashed'. Ignored if \code{lineColor} is \code{NULL}.}

\item{hullWidth}{Width of the convex hull. If 0 (as default), the convex
hull will not be displayed.}

\item{xLab}{x axis label.}

\item{yLab}{y axis label.}

\item{legendLabs}{Legend labels.}

\item{pointSize}{Point size.}

\item{pointShape}{Point shape.}

\item{alpha}{Opaqueness level.}

\item{labeledPoints}{Point labels to be displayed on the plot.}

\item{labelOutside}{Display labels for points specified by
\code{labeledPoints} even if they fall outside the boundaries imposed by
\code{labXThr} and \code{labYThr}. Ignored if \code{labeledPoints} is
\code{NULL} or both \code{labXThr} and \code{labYThr} are \code{NULL}.}

\item{labXThr}{Threshold used to plot labels based on \code{xCol} values.}

\item{labYThr}{Threshold used to plot labels based on \code{yCol} values.}

\item{labelType}{Whether to draw a box around labels (option 'boxed') or not
(option 'free'). Default is 'free'.}

\item{labelSize}{Label size. Ignored if \code{labelDF} is \code{NULL}.}

\item{labelColor}{Label color. Ignored if \code{labelDF} is \code{NULL}.}

\item{labelRepulsion}{Repulsion strength between labels.}

\item{labelPull}{Attraction strength between a text label
and its data point.}

\item{maxOverlaps}{Maximum overlaps. Ignored if \code{labelDF}
is \code{NULL}.}

\item{legendPos}{Legend position.}

\item{legendTextSize}{Legend text size.}

\item{axisTextSize}{Axis text size.}

\item{axisTitleSize}{Axis title size.}

\item{...}{Additional arguments passed to \code{centerTitle}.}
}
\value{
An object of class \code{gg}.
}
\description{
This function plots the convex hull of a set of points. It can also draw
a vertical or a horizontal line (or both), dividing the hull into areas of
different colors.
}
\examples{
pointsDF <- data.frame(x = c(1, 2, 4, 7, 10,
12, 13, 15, 16),
y = c(1, 1, 2, 3, 3, 2,
1, 2, 1))
hullPlot(pointsDF, 'Hull plot', 7, 1.5)

}
