我有以下的柱状图,但我只能改变边框的颜色。无论我尝试什么,都不能改变柱状图内部的颜色,它仍然是灰色的。
pteddf=data.frame(x=c(0:12),runif(13),runif(13))
tidyr::pivot_longer(pteddf, -x)
colors=c("red", "blue")
ggplot(tidyr::pivot_longer(pteddf, -x),aes(-x,value,color=name,group=name))+
geom_bar(stat="identity",position=position_dodge())+
scale_color_manual(name="",labels = c("Negative TED","Positive TED"),
values= colors)+
scale_fill_manual( values = colors)