stamp_wash: Stamp some text

View source: R/stamp_wash.R

stamp_washR Documentation

Stamp some text

Description

This function adds a text annotation layer

Usage

stamp_wash(
  xmin = -Inf,
  ymin = -Inf,
  xmax = Inf,
  ymax = Inf,
  x = 0,
  y = 0,
  alpha = 0.5,
  color = alpha("linen", 0),
  fill = "linen",
  linetype = "solid",
  size = 0.5,
  xxyy = NULL
)

Arguments

alpha

numeric between 0 and 1 indicating transparency, defaults to 1 fully opaque, zero is fully transparent

color

a character string indicating color, defaults to "black", for other named colors check out https://evamaerey.github.io/ggplot2_grammar_guide/named_colors

fill

a character string indicating fill color, defaults to "grey35", for other named colors check out https://evamaerey.github.io/ggplot2_grammar_guide/named_colors

linetype

a string indicating linetype, "solid", "dashed", "dotted", defaults to "solid"

size

numeric value indicating line width, defaults to 1.5

Examples

# wash
library(ggplot2)
ggplot(cars) +
 aes(speed, dist) +
 geom_point() +
 stamp_wash() +
 stamp_wash(fill = "red")

# over backdrop
ggbackdrop() +
 stamp_wash(fill = "green",
            alpha = .2)

EvaMaeRey/ggstamp documentation built on June 30, 2022, 11 p.m.