The function is based on the example found here: https://www.r-bloggers.com/2012/05/adding-watermarks-to-plots/.
Usage
add_watermark(
watermark_toggle = TRUE,
lab = "For Internal Use Only",
col = "grey",
alpha = 0.7,
fontface = "plain",
rot = 0,
width = 0.6,
pos = c(0.5, 0.5),
align = "centre"
)
Arguments
- watermark_toggle
Set to TRUE to insert a watermark layer for ggplot
- lab
Text to be displayed
- col
Color of watermark text
- alpha
Text transparency
- fontface
"plain" | "bold" | "italic" | "bold.italic"
- rot
rotation (0,360), NA = from lower left to upper right corner
- width
text width relative to plot
- pos
x- and y-position relative to plot (vector of length 2)
- align
"left" | "right" | "center" | "centre" | "top" | "bottom", can also be given as vector of length 2, first horizontal, then vertical