Would you try patchwork
and cowplot
?
library(ggplot2)
library(patchwork)
p1 <- ggplot(data.frame(x = 2000:2020, y = rnorm(21)), aes(x, y)) +
geom_line() +
theme_classic()
p2 <- ggplot(data.frame(x = 1:15, y = runif(15)), aes(x, y)) +
geom_bar(stat = "identity") +
theme_classic()
library(cowplot)
plot_grid(p1, p2, rel_widths = c(1, 1), align = "v", axis = "tb")