<分区>
我正在尝试使用手动填充颜色制作条形图。现在我有 5 列的 5 种默认颜色。我想继续使用 5 种不同的颜色,但手动指定。我尝试了 scale_color_manual
选项,但它不起作用。我究竟做错了什么?谢谢。
mycolors <- c("#F8B195", "#F67280", "#C06C84", "#6C5B7B", "#355C7D")
sub_terms %>%
mutate(term=reorder_within(term, beta, topic)) %>%
ggplot(aes(term, beta, fill = factor(topic))) +
geom_col(show.legend = F) +
scale_color_manual(values=mycolors) +
facet_wrap(~ topic, scales = "free", nrow=1) +
coord_flip()+
scale_x_reordered()