ggplot vertical line code example Example: add a vertical line in ggplot + geom_vline(xintercept = 3, linetype="dotted", color = "blue", size=1.5)