【发布时间】:2021-10-17 02:55:17
【问题描述】:
# A tibble: 8 × 4
measurement log2_fc locus operon
<chr> <dbl> <chr> <chr>
1 transcriptome 1 PA3552 arn
2 transcriptome 1.5 PA3553 arn
3 proteome NA PA3552 arn
4 proteome 2 PA3553 arn
5 transcriptome 2.5 PA1179 opr
6 transcriptome 3 PA1180 opr
7 proteome NA PA1179 opr
8 proteome NA PA1180 opr
plot <- ggplot(data=x,aes(x=locus,y=log2_fc,color=measurement)) +
geom_jitter()
plot + facet_wrap(~operon, ncol=2)
我正在使用上面的代码创建一个图,比较通过两种不同测量方法获得的基因的 log2_fc。我想通过基因所属的操纵子将情节分开,但我只想让操纵子中的基因沿着每个方面的 x 轴绘制。目前它正在创建下面的情节:
有没有办法只在 x 轴上绘制每个轨迹值一次,并且仍然用操作子分隔数据?
【问题讨论】:
-
试试
scales = "free_x"infacet_wrap
标签: r ggplot2 tibble facet-wrap