Reputation: 21
I have tried many ways to get the y-axis title of a patchwork collection of ggmaps to appear close to the axis but couldn't succeed. Instead I get something like this:
It is only reasonable to think there is a margin around the image.
How do I get this title closer?
I want this output:
I tried this:
library(grid)
library(gridtext)
yleft <- grid.text("Latitude (°N)", rot = 90, vjust = 0.50, gp = gpar(fontsize = 12, fontfamily = "serif"))
bottom <- grid.text("Longitude (°E)", hjust = 1.05, gp = gpar(fontsize = 12, fontfamily = "serif"))
{ wrap_elements(yleft) +
{{Pb1 + Pb2 + Pb3 + Pb4 + Pb5 + Pb6 + Pb7 + Pb8+
plot_layout(guides='collect', ncol = 2)}} +
plot_layout(widths=c(1,20,1)) } /
bottom +
plot_layout(heights=c(100,1,1))
Upvotes: 0
Views: 14