Reputation: 47
I created a plot with multiple facets, thanks to tmap (R package) and tm_facets.
I would like to remove the borders of the facets titles (i.e. the black rectangles on top of each map), but I can't figure out how.
Here is an example:
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")
Thanks in advance for any help.
Upvotes: 2
Views: 1669
Reputation: 126
you can try yo use frame.lwd = NA and optional panel.label.bg.color = NA to remove the background colour in the 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)
Upvotes: 6
Reputation: 1638
You can set that parameter, and many others in the tm_layout() function. In this case just set the frame argument to be 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)
Upvotes: 0