Dummy code:
library(ggplot2)
library(patchwork)
plot1 <- mpg %>% ggplot()
plot2 <- mpg %>% ggplot()
plot3 <- mpg %>% ggplot(aes(cyl, displ)) +
geom_point(aes(colour = manufacturer)) +
guides(colour=guide_legend(ncol=4))
(plot1 + plot2) / plot3
I'm not looking for a combined legend, but something which looks like:
Where the legend is 'considered' part of the plot. I've tried adding in margins with theme() and plot_spacer() but it's not exactly what I want. This is what I get:



