striptext {heR.Misc}R Documentation

Annotate a Plot With a Strip of Labels

Description

Plot a strip of labels on a plot at a single Y value and specified X values, with optional arrows, border, and fill colors

Usage

striptext(labels, Y = 0, X = seq(along = labels), x = NULL, y = NULL,
          as.colors = FALSE, rotated = FALSE,
          vfont = c("sans serif", "plain"), col = "black", cex = 1,
          border = TRUE, to.edge = TRUE, border.col = "black",
          border.lwd = 2, border.offset = c(0, 0), fill = NA,
          arrow.lwd = 1, arrow.angle = 30, arrow.length = 0.1,
          arrow.col = "black", ...)

Arguments

labels a character vector containing text to plot as a strip
Y the Y value where the strip of text will be placed
X a vector of X values where each character in labels will be drawn
x optional vector giving X values for the endpoints of arrows, set equal to X by default
y optional vector of Y values for the endpoints of arrows, if not specified then no arrows will be drawn
as.colors logical, whether to draw colored boxes instead of text, if TRUE then labels are interpreted as color names
rotated logical, whether to draw the text rotated 90 degrees or not
vfont the vector font specification, defaulting to plain sans serif
col the color(s) of the text characters
cex the magnification factor for text
border logical, whether to draw an optionally filled border around the text or not
to.edge logical, whether to draw the border flush with the edge of the plotting area or not
border.col the color of the border
border.lwd the line width of the border
border.offset a two-element vector giving x and y offsets for the border in addition to the existing 1/2 character offset
fill optional color to use when filling the border area, defaulting to no color (unfilled)
arrow.lwd the line width for arrows, defaulting to 1
arrow.angle the angle of the arrowhead lines, defaulting to 30 degrees
arrow.length the length of the arrowheads defaulting to 0.1
arrow.col the color of arrows
... additional arguments to the text function

Details

In the future, features for automatically plotting stacked strips on a plot or for plotting a legend may be added.

Value

Invoked for adding a strip of text, and possibly arrows, to an existing plot for the purpose of annotation.

Author(s)

Neil Klepeis


[Package heR.Misc version 0.0.4 Index]