y轴中断与gg.gap

时间:2020-10-12 12:27:03

标签: r ggplot2 boxplot

我正在尝试在箱图中断开y轴。 Boxplot with y-axis break

由于某些原因,gap.boxplot无法管理!

最后找到了另一个包裹gg.gap !!!

geom_boxplot()+
facet_wrap(~SB, scale= "free")+
scale_fill_futurama(palette=c("planetexpress")) +
guides(colour=FALSE) +
labs(title = "Terminally branched FAs",
subtitle = get_test_label(res.aov, detailed = TRUE))+
ylab( "% of total PLFA")+
xlab(" ")+
theme(axis.title.y = element_text( size= 12))+
theme(title = element_text(size=10) ,legend.position = "none", plot.subtitle =element_text(size=10),
strip.text.x = element_text(margin = margin(0.05,0,0.05,0, "cm")))

p1<- gg.gap(plot=p1,
segments=list(c(20,70)),
ylim=c(0,100), margin = c(top = 2, right = 1, bottom = 1, left = 1))

问题在于它还在图的两部分之间添加了所有标题

有人能推荐一种解决方案吗?或另一种折断轴的方法。我正在

gap.boxplot(termin, gap=c(20,80))
Error: $ operator is invalid for atomic vectors with gap.boxplot.

已经尝试转换为数据框,但这无济于事

0 个答案:

没有答案
相关问题