plotAddLabels.characters {MorphoTools2} | R Documentation |
Add Labels to a Plot
Description
This is a generic function for drawing labels to the character arrows of pcadata
and cdadata
objects.
Usage
plotAddLabels.characters(result, labels = characters(result), include = TRUE,
axes = c(1,2), pos = NULL, offset = 0.5, cex = 0.7, col = NULL, ...)
Arguments
result |
|
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 pos is specified, this value controls the distance (offset) of the text label from the point in fractions of a character width. |
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"))
pcaRes = pca.calc(centaurea)
plotCharacters(pcaRes, labels = FALSE)
plotAddLabels.characters(pcaRes, labels = c("MW", "IW", "SFT", "SF", "LW"), pos = 2, cex = 1)
plotAddLabels.characters(pcaRes, labels = c("LLW", "ILW", "LBA"), pos = 4, cex = 1)
plotAddLabels.characters(pcaRes, labels = c("ML", "IV", "MLW"), pos = 1, cex = 1)