9

I am trying to plot a map without the 'box border' around it.

Does anybody know how to work around the tmap package to not print the 'outer box border'? - not to be confused with tm_borders as it is a segment plotting the border of the polygons in the map.

Here's my example code:

tm_obj <- tm_shape(area_spdf) + 
          tm_fill(col = var, palette = "Blues", legend.show = FALSE) +
          tm_borders(col = "burlywood4", lwd = 0.25)`

save_tmap(tm = tm_obj, 
          filename = paste("plot_tm_output_", var, ".png", sep = ""))`

enter image description here

jazzurro
  • 23,179
  • 35
  • 66
  • 76
gemkeeper
  • 125
  • 2
  • 6

1 Answers1

11

You can use tm_layout to specify not to draw frame:

 tm_obj <- tm_shape(area_spdf) + 
           tm_fill(col = var, palette = "Blues", legend.show = FALSE) +
           tm_borders(col = "burlywood4", lwd = 0.25) +
           tm_layout(frame = FALSE)
HubertL
  • 19,246
  • 3
  • 32
  • 51