R tmap:如何调整图例框线宽

R tmap:如何调整图例框线宽,r,tmap,R,Tmap,我正试图用酷炫的tmap软件包制作一张地图,但我不知道如何调整图例框的线宽。我查看了令人印象深刻的tm_布局参数列表,但找到的最接近的参数是frame.lwd,但它指的是地图的框架。我用legend.frame.lwd进行了猜测,但没有定义。以下是一个玩具示例: library(tmap) data(Europe) tm_shape(Europe) + tm_polygons("well_being", textNA="Non-European countries", title="Wel

我正试图用酷炫的
tmap
软件包制作一张地图,但我不知道如何调整图例框的线宽。我查看了令人印象深刻的
tm_布局
参数列表,但找到的最接近的参数是
frame.lwd
,但它指的是地图的框架。我用
legend.frame.lwd
进行了猜测,但没有定义。以下是一个玩具示例:

library(tmap)
data(Europe)

tm_shape(Europe) +
  tm_polygons("well_being", textNA="Non-European countries", title="Well-Being Index") +
  tm_text("iso_a3", size="AREA", root=5) +
  tm_layout(legend.position = c("RIGHT","TOP"),
            legend.frame = TRUE,
            frame.lwd = 5) # legend.frame.lwd does not exist

在较新版本的
tmap
中,参数
legend.frame.lwd
包含在中。下面是一个使用
tmap
2.2版的示例:

library(tmap)
data("World")

tm_shape(World) +
  tm_polygons("HPI") +
  tm_layout(legend.frame = TRUE,
            frame.lwd = 5,
            legend.frame.lwd = 5)

如果您需要快速解决方案,而不需要动态执行。您可以另存为pdf并使用
inkscape
Hi@andrelrico。我会对
R/tmap
解决方案感到好奇。但是,事实上,我把Inkscape作为一个可行的选择。据我所知,这是不可能的。您可以请求添加此功能。谢谢@Jaap的建议。它现在是一个