ggplot(aes(x=reorder(Care,value),y=value,fill=variable))+geom_bar(stat='identity',position = 'dodge') 图中排序失败; 尝试用reorder对不同facet中的柱子进行排序: df%>%group_by(Care,variable)%>% summarise(value=mean(value))%>% ggplot(aes(x=reorder(Care,value),y=value))+geom_bar(stat=...
跟着Nature microbiology学作图:R语言ggplot2堆积柱形图每个柱子单独配色/多个图例排序 论文 A high-quality genome compendium of the human gut microbiome of Inner Mongolians https://www.nature.com/articles/s41564-022-01270-1 2023Naturemicrobiology--Ahigh-qualitygenomecompendiumofthehumangutmicrobiomeofInnerMo...