View source: R/plot.addLabels.characters.R
plotAddLabels.characters | R Documentation |
This is a generic function for drawing labels to the character arrows of pcadata
and cdadata
objects.
plotAddLabels.characters(result, labels = characters(result), include = TRUE,
axes = c(1,2), pos = NULL, offset = 0.5, cex = 0.7, col = NULL, breaks = 1, ...)
result |
an object of class |
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. |
breaks |
a numeric, giving the width of one histogram bar. |
... |
further arguments to be passed to |
None. Used for its side effect of adding elements to a plot.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.