My dataframe is
steps.1 interval.1 steps.2 interval.2 steps.3 interval.3
1 0 0 0 0 0 0
2 0 5 0 5 0 5
3 0 10 0 10 0 10
4 0 15 0 15 0 15
5 0 20 0 20 0 20
6 0 25 0 25 0 25
7 0 30 0 30 0 30
8 0 35 0 35 0 35
9 0 40 0 40 0 40
10 0 45 0 45 0 45.................
.
.
.
.
I am trying to plot a graph between each of step.1 vs interval.1 using ggplot
My code
g<-ggplot(temp,aes(x=interval.1,y=steps.1))+scale_x_continuous(name="intervals",breaks = seq(1000,1500,50),limits = c(1000,1500))
g <- g + geom_jitter(aes(x=interval.1,y=steps.1,color="dark red")) + geom_jitter(aes(x=interval.2,y=steps.2,color="green"))+ geom_jitter(aes(x=interval.3,y=steps.3,color="orange"))
+ geom_jitter(aes(x=interval.4,y=steps.4,color="violet"))+ geom_jitter(aes(x=interval.5,y=steps.5),color="blue") + geom_jitter(aes(x=interval.6,y=steps.6,color="pink"))
But the legend box appears with random colors, ie, if I give color green it is plotting for different color and I am unable to change the name of each text labels in legend box?