You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
I know we can draw the latter chart by using colour=alpha("red", 0.1), but I believe alpha is a transparency param for the entire layer, not only for the line or the fill. For me, this is a matter of semantics. Are there any reason not to use alpha for colour?
The possible implementation is very simple. We just need to change those two lines to col = alpha(aes$colour, aes$alpha):
I am so sorry to see this! You should believe in yourself more hadley :-).
As a result, there is no way to separately tune the line and the fill without using two geoms now, one with fill = NA and another with color = NA. My very common use case is to have a transparent filing with a solid line - it is now impossible:
ggplot(diamonds %>% filter(cut %in% c("Very Good", "Ideal")), aes(x = price, fill = cut)) + theme_bw() +
geom_histogram(binwidth = 1000) +
geom_density(aes(x = price, y = ..count.. * 1000), color = "black", alpha = 0.3) +
geom_density(aes(x = price, y = ..count.. * 1000), color = "black", fill = NA) +
facet_grid(cut ~ ., scales = "free_y")
While if you wanted to get the line lighter, you can always change its color!
Could we revert this? I'm pretty sure it's breaking more code now than it would if reverted for 2.1...