I was trying few refinements in my plot and encounter that alpha
in geom_segment
is not working properly. For minimum working example check this:
ggplot(mtcars, aes(hp, mpg)) +
geom_point() +
geom_segment(aes(x = 100, xend = 200, y = 20, yend = 20),
inherit.aes = FALSE,
size = 10,
alpha = 0.5,
color = "blue")
However, if you change the alpha to really low value such as 0.005, 0.001 appears working. You can only see some effect from 0.05 to 0.001.
Aren't the alpha values supposed to change in a linear manner between 0 and 1 or have I understood incorrectly?