I have a ggplot that plots 4 different series as lines. I would like to set each line to a different transparency. How do I do this? More specifically, I want two of the lines to be transparent and two lines to be opaque. I am aware of how to set all lines to the same transparency with alpha, but now how to set the transparency individually.
Here is example data and code:
mydata = data.frame(rep(1:4,4),runif(16),c(rep("A",4),rep("B",4),rep("C",4),rep("D",4)))
colnames(mydata) = c("month","price","series")
library(ggplot2)
ggplot(mydata,aes(month,price,color=series))+geom_line()