-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Milestone
Description
This has changed following #1371, and I think (personally) that this is the wrong decision.
Pros: it's slightly more 'natural' to have alpha impacting both the line and fill (?)
Cons: the line texture is modified by the alpha parameter in a way that is irreversible, and thus you need a different geom for the common use case (to me) of having a solid line with a transparent filling.
Here is an example:
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 = "NA", alpha = 0.3) +
geom_density(aes(x = price, y = ..count.. * 1000), color = "black", fill = NA) +
facet_grid(cut ~ ., scales = "free_y", space = "free_y")
I would vote for reverting this behavior, as I'm pretty sure it's breaking more graphing code now than it would if reverted for 2.1.
The downside of the old behavior is that you need to change the color directly if you want something lighter.
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior