I want to plot multiple geom_lines in ggplot2 in a for loop. I am able to plot lines but am facing problem in coloring them. can anyone suggest how to do this?
pp=ggplot(a,aes(x=a$Nucleotide_position),y=data[,1:(length(a)-1)])
for (i in 1:(length(a)-1))
{
pp=pp+geom_line(aes(x,y),data=data.frame(x=a$Nucleotide_position,y=a[,i]))
}
print(pp)