addText: Add text to an existing lattice plot

Description Usage Arguments Details Value

View source: R/addText.R

Description

This serves the same role as the base function graphics::text() for use in lattice plots. (Also can be called as text2().)

Usage

1
addText(x, y, labels, col = "red", cex = 2/3, adj = 0.5, ...)

Arguments

x, y

Numeric vectors of coordinates where text labels should be written. If y is missing, x is treated as a list with 'x' and 'y'

labels

Character vector or expression specifying the text to be written. If x is specified as a list and y is a character vectors, labels will use the values in y

col, cex, adj

Default values passed to lattice::panel.text()

...

Other parameters are passed to lattice::panel.text()

Details

Text labels can be added to an existing simple lattice plot with this function. Values in x, y and labels are recycled as needed. Interaction with the existing plot occurs through the function lattice::trellis.currentLayout(). See that function for more details.

Value

Nothing is returned. This function is called for the side effect of adding labels.


ornelles/flowExtra documentation built on March 1, 2020, 9:33 a.m.