stamp_vline: Horizontal line, wraps geom_vline w defaut at y = 0

View source: R/stamp_vline.R

stamp_vlineR Documentation

Horizontal line, wraps geom_vline w defaut at y = 0

Description

Horizontal line, wraps geom_vline w defaut at y = 0

Usage

stamp_vline(
  xintercept = 0,
  alpha = 1,
  color = "black",
  linetype = "solid",
  size = 1.5
)

Arguments

xintercept

x position of vertical line

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

linetype

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

size

numeric value indicating line width, defaults to 1.5

Examples

library(ggplot2)
ggplot(cars) +
aes(speed, dist) +
geom_point() +
stamp_vline()

# on a canvas
ggcanvas() +
stamp_vline(color = "cadetblue") +
stamp_vline(0:5,
           linetype = rep(c("dotted", "dashed"), 3))

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