你那个应该是填充颜色,应该用scale_fill_manual,你试试看
你好,我用R语言绘制了一个旭日图,但是没有办法配色,不管我怎么设置配色,图的颜色都是一样的渐变色,想请教一下您看看是什么原因。代码和绘图结果如下:
mypalette<-c("#8C8C8C","#87CEFA","#FF00FF","#B22222","#EE9A49","#858585","#080808","#836FFF","#87CEFF","#7FFFD4","#008B8B","#CD661D","#CDC9A5","#0000FF","#00FF00","#EDEDED","#FAEBD7","#666666","#EE0000","#8E388E","#C1FFC1")
ggplot(data, aes(x=size, y=per,fill=species))+geom_col(position="fill")+coord_polar(theta="y")+scale_colour_manual(values=mypalette)