[英]How to remove the empty space that is created with ggpubr stat_pvalue_manual hide.ns = true?
When stat_pvalue_manual function of pubr is called:当调用pubr的stat_pvalue_manual function时:
ggplot + stat_pvalue_manual(statistics, label = "p.adj.signif",
coord.flip = TRUE,
#hide.ns = TRUE,
tip.length = 0,
bracket.size = 0)+coord_flip()
The following graph is produced:生成以下图表:
However, one is only interested in data that is significant, therefore ns data is omitted by calling hide.ns = TRUE as follows:然而,人们只对重要的数据感兴趣,因此通过调用 hide.ns = TRUE 来省略 ns 数据,如下所示:
ggplot + stat_pvalue_manual(statistics, label = "p.adj.signif",
coord.flip = TRUE,
hide.ns = TRUE,
tip.length = 0,
bracket.size = 0)+coord_flip()
This creates empty space where the ns data previously occupied, is there a way to remove it?这会在 ns 数据之前占用的地方创建空白空间,有没有办法删除它?
To calculate the xy positions, this is done as follows in the statistics object:要计算 xy 位置,在统计数据 object 中按如下方式完成:
statistics <- dataframe %>%
tukey_hsd(value~group) %>%
add_xy_position(fun = "mean_se", x= "group")
Thanks in advance!提前致谢!
I did this by filtering the statistics table to only show significant values.我通过过滤统计表以仅显示重要值来做到这一点。
statistics <- statistics %>% filter(p.adj.signif != "ns")
ggplot + stat.pvalue_manual(statistics, label = "p.adj.signif")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.