I am using the following piece of code to create a bar graph:
temp1 <- melt(final,id=\'Time\')
p <- ggplot(temp1, aes(x=Time, y=value, fill=variable)) +
There is no reproducible data. I, therefore, created a simple data here. I also simplified the code of the OP. What is necessary here is scale_fill_manual
.
mydf <- data.frame(time = letters[1:3],
variable = LETTERS[1:3],
value = runif(3, 10, 15),
stringsAsFactors = FALSE)
ggplot(mydf, aes(x=time, y=value, fill=variable)) +
geom_bar(stat="identity") +
scale_fill_manual(values=c("#a6cee3","#1f78b4","#b2df8a"))