plotAddLabels.points {MorphoTools2} | R Documentation |
Add Labels to a Plot
Description
This is a generic function for drawing labels to the data points of pcadata
, pcoadata
, nmdsdata
, and cdadata
objects.
Usage
plotAddLabels.points(result, labels = result$objects$ID, include = TRUE,
axes = c(1,2), pos = NULL, offset = 0.5, cex = 1, col = NULL, ...)
Arguments
result |
result of |
labels |
a vector of label names, which should be included / excluded from plotting, see |
include |
logical, specify if labels in |
axes |
x, y axes of plot. |
pos |
a position specifier for the text. Values of 1, 2, 3 and 4, respectively indicate positions below, to the left of, above and to the right of the point. |
offset |
when |
cex |
character expansion factor for text. |
col |
the colours for labels. |
... |
further arguments to be passed to |
Value
None. Used for its side effect of adding elements to a plot.
Examples
data(centaurea)
centaurea = naMeanSubst(centaurea)
centaurea = removePopulation(centaurea, populationName = c("LIP", "PREL"))
pops = populOTU(centaurea)
pcaRes = pca.calc(pops)
plotPoints(pcaRes, col = c("red", "green", "blue", "red"),
pch = c(20, 17, 8, 21), pt.bg = "orange", legend = FALSE)
plotAddLabels.points(pcaRes, labels = c("LES", "BUK", "VOL", "OLE1"), include = TRUE)
plotPoints(pcaRes, col = c("red", "green", "blue", "red"),
pch = c(20, 17, 8, 21), pt.bg = "orange", legend = FALSE)
plotAddLabels.points(pcaRes, labels = c("LES", "BUK", "VOL", "OLE1"), include = FALSE)