如何使用 ggplot2 绘制分组条形图?

问题描述 投票:0回答:0

我想绘制基因本体富集分析结果。 x 轴按 GO 术语分组。每个 GO term 都有几个样本。 y 轴是基因比率。条形由 p.adjust 着色。有什么方法可以使用 ggplot2 来绘制它吗?

example picture of grouped bar plot

g <- ggplot(tmp_GO_plot,aes(x=?, y=GeneRatio,fill=p.adjust))
g <- g + geom_bar(position = "dodge")
g
ggplot2 ontology
© www.soinside.com 2019 - 2024. All rights reserved.