Horizontal line, wraps geom_vline w defaut at y = 0

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

Value

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))