#我想问一下,我的ggplot2为什么无法更改默认颜色
library(ggplot2)
data5<-read.table("figure data5.txt",header=T,sep="\t",row.names=1,stringsAsFactors = F)
data5$group=factor(data5$group,levels = c("0","9","18","25","37","47"))
library(paletteer)
color <- paletteer_d("ggsci::default_igv",n=51)
p<- ggplot(data5, aes(x=group, y=100 * value, fill = Taxonomy))+
#数据输入:样本、物种、丰度
geom_col(position = 'stack', width = 0.6) + # stack:堆叠图
scale_y_continuous(expand=c(0, 0))+# 调整y轴属性,使柱子与X轴坐标接触
labs(x = 'Samples', y = 'Relative Abundance(%)',fill="Phylum") +#设置X轴和Y轴的信息
theme_bw()+
scale_color_manual(values =color)+
#facet_grid(.~level)+
theme(axis.text = element_text(size = 12), axis.title = element_text(size = 12))
p
#我明明设置了颜色,但是运行之后颜色并没有任何变化
已经试过好多palette了还是不行,不更改颜色,想问怎么办啊