Description Usage Arguments Value Author(s) Examples
View source: R/plotting.helper.functions.r
boxtext places a text given in the vector labels
onto a plot in the base graphics system and places a coloured box behind
it to make it stand out from the background.
1 2 3 |
x |
numeric vector of x-coordinates where the text labels should be
written. If the length of |
y |
numeric vector of y-coordinates where the text labels should be written. |
labels |
a character vector specifying the text to be written. |
col.text |
the colour of the text |
col.bg |
color(s) to fill or shade the rectangle(s) with. The default
|
border.bg |
color(s) for rectangle border(s). The default |
adj |
one or two values in [0, 1] which specify the x (and optionally y) adjustment of the labels. |
pos |
a position specifier for the text. If specified this overrides any adj value given. Values of 1, 2, 3 and 4, respectively indicate positions below, to the left of, above and to the right of the specified coordinates. |
offset |
when |
padding |
factor used for the padding of the box around the text. Padding is specified in fractions of a character width. If a vector of length two is specified then different factors are used for the padding in x- and y-direction. |
cex |
numeric character expansion factor; multiplied by codepar("cex") yields the final character size. |
font |
the font to be used |
Returns the coordinates of the background rectangle(s). If multiple labels are placed in a vactor then the coordinates are returned as a matrix with columns corresponding to xleft, xright, ybottom, ytop. If just one label is placed, the coordinates are returned as a vector.
Ian Kopacka
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.