does anyone know how I can plot several line graphs in one graph with different color codes?
ggplot(df, aes(x=variable1)) +
geom_line(aes(y=variable2,color=group1))+
geom_line(aes(y=variable3,color=group1))
I would like to have one color code for the first geom_line and a different one for the second geom_line.
color_group <- c("blue","black","yellow2","orange")
color_flag <- c("green","red","yellow2","cyan")
With
scale_colour_manual(values=color_group)
I can only assign a color code to both of them simultaneously and not separately. Thanks for your help!