Open mjskay opened 5 years ago
Just ran into this problem. I'd like to set ribbon fill, but not the line, semitransparent. Is there a current workaround for this?
The simplest workaround would probably be to disable the line (color = NA
) and then draw the line as a separate geom. That, or you could try assigning a fill color that has an alpha component to it (not 100% sure that would work)
Got it. After playing around, this works:
data %>%
ggplot(aes(x = x, y = Estimate, ymin = Q2.5, ymax = Q97.5,
fill = condition, color = condition)) +
geom_lineribbon() +
scale_fill_viridis_d(alpha = 1/2) +
scale_color_viridis_d()
Awesome! Had no idea the color scales had an alpha argument, that's very useful!
including: