| hullPlot | R Documentation |
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.
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,
...
)
pointsDF |
A data frame with the x and y coordinates of the points. |
title |
Plot title. |
xInt |
The coordinate where the vertical line intersects the x axis. |
yInt |
The coordinate where the horizontal line intersects the y axis. |
palette |
Color palette. |
lineColor |
The color of the horizontal and vertical dividing lines,
if provided. If |
lineWidth |
The width of the horizontal and vertical dividing lines.
Ignored if |
lineType |
The type of the horizontal and vertical dividing lines.
Choose between 'dashed','solid', 'dotted', 'dotdash', 'longdash' and
'twodash'. Default is 'dashed'. Ignored if |
hullWidth |
Width of the convex hull. If 0 (as default), the convex hull will not be displayed. |
xLab |
x axis label. |
yLab |
y axis label. |
legendLabs |
Legend labels. |
pointSize |
Point size. |
pointShape |
Point shape. |
alpha |
Opaqueness level. |
labeledPoints |
Point labels to be displayed on the plot. |
labelOutside |
Display labels for points specified by
|
labXThr |
Threshold used to plot labels based on |
labYThr |
Threshold used to plot labels based on |
labelType |
Whether to draw a box around labels (option 'boxed') or not (option 'free'). Default is 'free'. |
labelSize |
Label size. Ignored if |
labelColor |
Label color. Ignored if |
labelRepulsion |
Repulsion strength between labels. |
labelPull |
Attraction strength between a text label and its data point. |
maxOverlaps |
Maximum overlaps. Ignored if |
legendPos |
Legend position. |
legendTextSize |
Legend text size. |
axisTextSize |
Axis text size. |
axisTitleSize |
Axis title size. |
... |
Additional arguments passed to |
An object of class gg.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.