本次使用R语言复现Nature Communications上的1张组合图,这张图兼具颜值+节约版面!

Fig. 1 b原图

❤️复现效果图-b图❤️


✅读入测试数据!


✅关键代码,

# 关键代码
library(ggplot2)
library(dplyr)
library(cowplot)
# --- 外圈图 ---
p_outer <- ggplot(data_aug, aes(x=factor(id), y=average, fill=w)) +
geom_bar(stat="identity", width=0.8, show.legend=FALSE, alpha=1) +
coord_polar(start=0) +
geom_
posted on 2025-09-21 19:29  lxjshuju  阅读(26)  评论(0)    收藏  举报