Цвета можно манипулировать один за другим в "scale_fill_manual" с помощью руководства, например this
dataset<-structure(c(113L, 216L, 406L, 183L, 150L, 178L, 92L, 130L, 266L, 136L, 119L, 144L, -21L, -86L, -140L, -47L, -31L, -34L), .Dim = c(6L, 3L), .Dimnames = list(c("1", "2", "4", "8", "16", "32"), c("Total", "UP", "DOWN")))
dataset<-as.data.frame(dataset)
dataset$id<-rownames(dataset)
dataset<-cbind(melt(dataset)[7:18,],dataset$Total)
names(dataset)[names(dataset)=="dataset$Total"]<-"Total"
dataset$variable<-letters[1:nrow(dataset)]
dataset2<-dataset[1:6,c(1,4)]
Вам понадобится ggplot2, который очень полезен для графиков.
#install.packages("ggplot2")
library(ggplot2)
ggplot(dataset2, aes(factor(id,levels=dataset2$id), Total, group=1, colour=1)) +
geom_line(show.legend=F) +
geom_point(size=1, shape=16,show.legend=F) +
geom_bar(data=dataset, aes(x=id,y=value,fill=variable), stat="identity",position = "identity",show.legend=F)+
ylab(paste("number of genes")) + xlab(expression("kJ / m"^"2"))+
ggtitle("Skin 2hr Post Exposure")+
guides(fill=FALSE)+#turns off color legend for above/below 0
theme(legend.position="none")+
# scale_fill_brewer(palette = "Set3")+
scale_fill_manual(values=c("orange", "black","green","yellow","white","red","pink","blue","brown","magenta","lightgray","lightblue"))+
theme_bw()