.addTextToPoints {wrGraph} | R Documentation |
Add text to points on plot
Description
This function allows to add custom text as lables to points on standard xy-plot.
Usage
.addTextToPoints(
x,
paramLst = NULL,
labels = NULL,
cex = NULL,
col = NULL,
adj = "auto",
callFrom = NULL,
silent = FALSE,
debug = FALSE
)
Arguments
x |
(matrix, data.frame) coordinated of ponts on plot |
paramLst |
(list) additional parameters for plotting (priority over separate cex or col), otherwise names displayed will be taken from 'labels' or rownames of coordinates 'x' |
labels |
(character) the text to be displayed (has not priority over 'paramLst'), if nothing valid found numbers will be displayed |
cex |
(character) (numeric) size of text, as expansion factor (see also |
col |
(character or integer) use custom colors |
adj |
(character) values other than 0,0.5 or 1 will lead to 'auto' where text is displayed only to left of sufficient space available |
callFrom |
(character) allow easier tracking of messages produced |
silent |
(logical) suppress messages |
debug |
(logical) display additional messages for debugging |
Value
This function make a plot and may retiurn an optional matrix of outlyer-data (depending on argument getOutL
)
See Also
prcomp
(used here for the PCA underneith) , princomp
, see the package FactoMineR for multiple plotting options or ways of combining categorical and numeric data
Examples
set.seed(2019); dat1 <- matrix(round(runif(30),2), ncol=2)
plot(dat1) # traditional plot
.addTextToPoints(dat1, labels=letters[1:nrow(dat1)])