【发布时间】:2018-09-29 14:13:31
【问题描述】:
如何解决 tmap 图例中的垂直空间问题,例如链接的基本 R 示例中显示的问题? (Vertical spaces in legend;y.intersp 不是 tmap_add_legend() 识别的参数)
基本tmap代码:
library(sf)
library(tmap)
tm_shape(st_read(system.file('shape/nc.shp', package = 'sf'))) +
tm_polygons() +
tm_add_legend(
type = 'symbol',
labels = c('Variable A', 'Variable B', 'Variable C', 'Variable D', 'Variable E'),
col = c('#832424FF', 'rosybrown4', 'red', 'red', '#4F8DC2'),
shape = c(19, 19, 4, 5, 15)
)
【问题讨论】: