adeg.panel.label {adegraphics} | R Documentation |
Panel function for adding labels.
Description
Panel function for drawing labels into a trellis
graphic (lattice
package) with or without boxes around labels.
Usage
adeg.panel.label(x, y, labels, plabels, pos = NULL)
Arguments
x |
a numeric vector, x-coordinates for the labels |
y |
a numeric vector, y-coordinates for the labels |
labels |
a vector of character string, the labels |
plabels |
a list of parameters as an extract of
|
pos |
a position specifier for the text, used in panel.text.
Values of |
Value
Draws the labels.
Note
For more information about the use of panel functions, please see the lattice
package developed by Deepayan Sarkar.
Author(s)
Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray
References
The algorithm used for labels positions optimization is inspired by the pointLabel
function of the car
package (since 2022-10-22, moved from the the maptools
package, developed by Tom Short).
See Also
Examples
if(require(lattice, quietly = TRUE)) {
param <- adegpar("plabels")[[1]]
xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
adeg.panel.label(x, y, LETTERS[1:10], plabels = param)})
}
if(require(lattice, quietly = TRUE)) {
param$boxes$draw <- FALSE
param$col <- "blue"
xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
adeg.panel.label(x, y, LETTERS[1:10], plabels = param)})
}