library(tidyverse)
ggplot(cars) +
aes(y = dist) +
geom_density() +
geom_rug() ->
r;r
ggplot(cars) +
aes(speed) +
geom_density() +
geom_rug() ->
p; p
ggwipe::last_plot_wipe() +
aes(y = dist) +
geom_point() ->
q
library(patchwork)
(p + patchwork::plot_spacer()) / (q + r)