'Plot customised vertical lines up to the curve
Solution 1:[1]
Use geom_segment instead:
ggplot(dat, aes(x = x, y = y)) +
geom_line() +
geom_segment(aes(x = x, xend = x, y = min(dat$y), yend = y),
data = dat[ dat$x %in% c(10, 20, 30), ],
lty = "dashed")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | zx8754 |