I\'m using ggplot and have two graphs that I want to display on top of each other. I used grid.arrange from gridExtra to stack them. The problem is I want the
grid.arrange
The patchwork package handles this by default:
library(ggplot2) library(patchwork) A <- ggplot(CO2, aes(x = Plant)) + geom_bar() + coord_flip() B <- ggplot(CO2, aes(x = Type)) + geom_bar() + coord_flip() A / B
Created on 2019-12-08 by the reprex package (v0.3.0)