删除/自定义 tmap 中的分面边框 (tm_facets)
Remove / customize facets borders in tmap (tm_facets)
感谢 tmap(R 包)和 tm_facets。
我想删除分面标题的边框(即每张地图顶部的黑色矩形),但我不知道该怎么做。
这是一个例子:
library(tmap)
data(World, NLD_muni, NLD_prov, land, metro)
current.mode <- tmap_mode("plot")
tm_shape(NLD_prov) +
tm_polygons("gold2") +
tm_facets(by="name")
在此先感谢您的帮助。
您可以在 tm_layout() 函数中设置该参数和许多其他参数。在这种情况下,只需将 frame 参数设置为 false
library(tmap)
data(World, NLD_muni, NLD_prov, land, metro)
current.mode <- tmap_mode("plot")
tm_shape(NLD_prov) +
tm_polygons("gold2") +
tm_facets(by="name") +
tm_layout(frame = FALSE)
你可以尝试使用 frame.lwd = NA 和可选的 panel.label.bg.color = NA 来删除背景facetbox 中的颜色
library(tmap)
data(World, NLD_muni, NLD_prov, land, metro)
current.mode <- tmap_mode("plot")
tm_shape(NLD_prov) +
tm_polygons("gold2") +
tm_facets(by="name") +
tm_layout(frame = FALSE, frame.lwd = NA, panel.label.bg.color = NA)
感谢 tmap(R 包)和 tm_facets。
我想删除分面标题的边框(即每张地图顶部的黑色矩形),但我不知道该怎么做。
这是一个例子:
library(tmap)
data(World, NLD_muni, NLD_prov, land, metro)
current.mode <- tmap_mode("plot")
tm_shape(NLD_prov) +
tm_polygons("gold2") +
tm_facets(by="name")
在此先感谢您的帮助。
您可以在 tm_layout() 函数中设置该参数和许多其他参数。在这种情况下,只需将 frame 参数设置为 false
library(tmap)
data(World, NLD_muni, NLD_prov, land, metro)
current.mode <- tmap_mode("plot")
tm_shape(NLD_prov) +
tm_polygons("gold2") +
tm_facets(by="name") +
tm_layout(frame = FALSE)
你可以尝试使用 frame.lwd = NA 和可选的 panel.label.bg.color = NA 来删除背景facetbox 中的颜色
library(tmap)
data(World, NLD_muni, NLD_prov, land, metro)
current.mode <- tmap_mode("plot")
tm_shape(NLD_prov) +
tm_polygons("gold2") +
tm_facets(by="name") +
tm_layout(frame = FALSE, frame.lwd = NA, panel.label.bg.color = NA)