Hi all,
I am using a geom_density()
in a ggplot, with an aes(color = var2)
to compare multiple overlaying density plots. I have figured out how to use scale_color_manual
to manually change the colors to ones that I want - but there is a way to manually change the alpha
or size
, but have them differ based on which group?
i.e. I know how to make var2=1 as black and var1 = 2 as green, but lets say I want var1=1 density as thickness 2 and var1 = 2 density as thickness 0.5? (or alternatively as alpha = 1 and alpha = 0.5). Is there a way to do that?
Thanks everyone!
PS Would it matter if, instead of geom_density
, I used ggridges::geom_density_ridges
?