I'm looking for a way to create lines with ggplot() that have "pointy" edges, to get an overall look of "toothpicks".
For example, consider the following visualization:
library(tibble)
library(ggplot2)
my_df <-
tribble(~name, ~value,
"a", 1,
"a", 2,
"b", 1,
"b", 2)
my_df %>%
ggplot(aes(x = name, y = value)) +
geom_line(size = 1.5, lineend = "round") +
expand_limits(y = c(0.5, 2.5)) +
theme_bw()

Created on 2021-07-21 by the reprex package (v2.0.0)
Now, let's say I set
y_top <- 1.75
y_bottom <- 1.25
as the values from which the lines start to get "sharpened".
How can I get something similar to:

Although it would be ideal to also have the fade-out effect, the "toothpick" look is most important to me. Unfortunately, geom_lines()'s lineend argument doesn't support the "pointiness" I'm looking for.
Any idea how this could be achieved?
Thanks!
