r - Colouring different groups with different colours in ggplot -


i have dataset k990, variables lambda, price , group. plotting values following code

library(ggplot2) cbpalette <- c("#56b4e9", "#009e73", "#f0e442", "#0072b2", "#d55e00", "#cc79a7") p<-ggplot(k990, aes(x=lambda, y=price, group=group)) + geom_line()+ geom_point()+  scale_colour_manual(values = cbpalette) + ylim(0, 1000) p 

how can colour different groups colors cbpalette?


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -