我有几个ggplots
组合使用的图表patchwork
。我制作了一个ggplot
仅由 y 轴组成的。我现在正在努力将这个 y 轴 ggplot 移近 ggplots。有任何想法吗?
这是打包工作代码:
y_axis + decreasers_p+late_bloomers_p + o2_lovers_p + solo_riders_p + plot_layout(widths = c(1, 10),
guides = "collect",
design =
"12
13
14
15")
这是一些ggplot代码:
solo_riders_p <- ggplot(solo_riders, aes(x=days_incubated, y=emission))+
geom_point(aes(shape=compound, size=compound, fill=compound)) +
scale_shape_manual(values=c(21, 25))+
scale_size_manual(values=c(2.8, 2.5))+
scale_fill_manual(values=c("black", "grey"))+
labs(fill = "Compound", shape = "Compound", size = "Compound",
x = "Incubation time (days)",
y = "BVOC emission (nmol g-1 loi soil h-1)",
title = "solo_riders") +
theme_bw() +
facet_wrap(vars(jar), scales = "free_y")
y_axis <- ggplot(data.frame(l = decreasers_p$labels$y, x = 1, y = 1)) +
geom_text(aes(x, y, label = l), angle = 90) +
theme_void() +
coord_cartesian(clip = "off")