I want my lines and points to be slightly lighter for the last 7 data points. I tried to use alpha
, but no matter how small the increment I use, the points are way too light. Can I use alpha (and if yes, how), or do I have to mess with the colors manually?
I'm using tidyverse 1.3.0.
Example follows.
foo <- data.frame(x=seq(1:10))
foo$y <- foo$x
foo$alpha <- c(rep(1, 7), rep(0.5, 3))
ggplot(foo, aes(x, y)) + geom_point(aes(alpha=alpha))
with alpha=0.5:
with alpha=0.999, same lightness (too light):