I have a 4-panel map for which I would like to have one set of horizontal labels at the top (which would not be repeated) and one set of vertical labels on the sides (which would not be repeated). When a multiple-panel map is created based on values from a single attribute, tm_facets
automatically creates horizontal and vertical labels (see example here).
In the reproducible example, I would like "Raw values" and "Log-transformed values" to be shown once at the top of the set (instead of for each row) and "Area" and "Population" to be added as labels on the left of the plotting area.
library(tmap)
data(World)
World$area_log<-log(World$area)
World$pop_log<-log(World$pop_est)
tm_layout(panel.show=TRUE, panel.label.bg.color="white",
panel.labels=rep(c("Raw values", "Log-transformed values"), 2))+
tm_shape(World)+
tm_polygons(c("area", "area_log", "pop_est", "pop_log"))