【发布时间】:2020-11-24 19:33:34
【问题描述】:
plots <- data %>%
select( contains("Pct")) %>%
map(~ggplot(data, aes(y= . , x = Project_Name ,fill=Project_Name,)) +
geom_boxplot(alpha=0.7) +
theme(legend.position="none", axis.title.x=element_blank() , axis.text.x=element_blank() )+
labs(title=names(.)) +
scale_fill_brewer(palette="Dark2"))
ggarrange(plotlist = plots,common.legend = TRUE)
使用上面的代码,我可以得到绘图但不能得到 y 轴标签,我可以将选定的列名称添加为 y 轴标签还是绘图标题 (names(.)) 没有没用。
【问题讨论】: