Here is an example of the skeleton of how to do this using ggplot :
library(ggplot2) day <- 1:100 dat <- data.frame( day=day, x = day+(1+rnorm(100, 0, 10)), y = 5 + day+(1+rnorm(100, 0, 10)), when = cut(day, 5) ) ggplot(dat, aes(x=x, y=y, colour=when)) + geom_point()

And for smooth colors
ggplot(dat, aes(x=x, y=y, colour=day)) + geom_point() + scale_colour_gradient(low="pink", high="red") x, y = y, colour = day)) + geom_point () + ggplot(dat, aes(x=x, y=y, colour=day)) + geom_point() + scale_colour_gradient(low="pink", high="red")

source share