Skip to contents

Stamp the current plot in the extreme lower right corner. A free text or expression can be defined as text to the stamp.

Usage

stamp(text = .useTheme, las = NULL, cex = 0.6, col = "grey40")

Arguments

text

character string, expression, or toggle controlling the stamp text. .useTheme (default) or TRUE resolve to getTheme()$stamp, evaluated lazily at draw time. FALSE, NULL, or NA suppress the stamp. Any other string or unevaluated expression() is used as given.

las

orientation; see graphics::par(). NULL (default) inherits the current par("las"). las = 3 places the stamp vertically along the right edge instead of horizontally along the bottom.

cex, col

size and color of the stamp text.

Value

The text of the stamp as a character string, invisibly; an empty string if the stamp is suppressed.

Details

The default text is taken from the active theme (see theme). If user and date should be included by default, an unevaluated expression, which is evaluated when the stamp is drawn, will help:

setTheme(list(stamp = expression(gettextf("%s / %s",
  Sys.getenv("USERNAME"), fm(Sys.Date(), fmt = "yyyy-MM-dd")))))

For R results may not be satisfactory if par(mfrow=) is in effect.

See also

Examples


plot(1:20)
stamp()