bglabel: Label with background

Description Usage Arguments Details

View source: R/draw.R

Description

Create a label with background

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bglabel(
  x,
  y,
  text,
  bg = "#cccccc99",
  margin = 0.5,
  border = NA,
  pos = "center",
  cex = 1,
  ...
)

Arguments

x, y

numeric vectors (coordinates)

text

a character vector of labels

bg

character vector; background color for the labels

margin

numeric vector; margin (in percentage of a single character) for width and height around the labels

border

character vector; see rect for details

pos

character vector; position where labels should be placed, relative to the coordinates. Can be one of "topleft", "top", "topright", "left", "center", "right", "bottomleft", "bottom" and "bottomright".

cex

numeric vector; cex to be used for drawing the text

...

any further parameters are passed to the text function

Details

Creates a label with a background, a little extra margin (if necessary) etc.


riverplot documentation built on Jan. 22, 2021, 5:09 p.m.