watermark | R Documentation |
Watermark ggplot with "DRAFT" or other text.
watermark( plot, label = "DRAFT", size = 108, color = "black", alpha = 0.1, angle = 45, x = 0.5, y = 0.5, do = TRUE, ... )
plot |
A ggplot object to be watermarked. |
label |
Text to use as watermark. Defaults to "DRAFT". |
size |
Text size in points. Defaults to 108. |
color |
Watermark color. Defaults to "black". |
alpha |
Watermark transparency. Defaults to 0.1. |
angle |
Watermark angle. Defaults to 45°. |
x |
x position of label. Defaults to 0.5. |
y |
y position of label. Defaults to 0.5. |
do |
logical specifying whether to apply the watermark. Defaults to TRUE. |
... |
Arguments passed to cowplot::draw_label() |
Watermark ggplot with "DRAFT" or other text.
A ggplot2 object.
Dave Braze davebraze@gmail.com
draw_label
library(ggplot2) data(iris) tmp <- ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, color=Species)) + geom_point() watermark(tmp) ## alternately, in an rmarkdown file maybe do watermark(tmp, do=is_draft())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.