Well, your data was not so useful for reconstructing the graph, so I created another data set with samples
rmm<-data.frame( timestamp = as.POSIXct(rep(seq(as.Date("2014-01-01"), as.Date("2014-01-10"), by="1 day"),5)), serviceInstanceName = rep(letters[1:5], each=10), value = cumsum(rnorm(50)) )
And I don’t know exactly what you tried, but scale_color_manual should have worked. And if you want to change the line type, you need to set it to aes()
library(ggplot2) library(scales) ggplot(rmm, aes(x=timestamp, y=value, color=serviceInstanceName, linetype=serviceInstanceName)) + stat_smooth(size=1.5, method = "loess", level = 0.95, fullrange = TRUE, se = FALSE) + scale_x_datetime(breaks = date_breaks("1 day"), labels = date_format("%a/%m")) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + xlab("Day") + ylab("Utility") + ggtitle("Utility Trend") + scale_color_manual(values=c(a="orange",b="yellow", c="red", d="sienna",e="cornsilk"))

source share