我正在R中绘制一个简单的地图,但遇到了问题:标题与图形重叠在一起,我不知道该如何将其放置在面板外部。
使用ggplot2中的plot.title.position
选项在theme
函数中可以轻松实现此操作,由于tmap使用相同的逻辑,我认为可能有一种方法可以做到这一点。
library(sf)
library(tmap)
brasil <- st_read("/shp/BRUFE250GC_SIR.shp")
tm_shape(brasil) +
tm_borders() +
tm_fill() +
tm_compass() +
tm_scale_bar() +
tm_layout(
title = "The quick brown fox jumps over the lazy dog"
)