0
library(tmap)
library(sf)
example(st_read)

tm_shape(nc) + tm_fill("NWBIR74")+tm_scale_bar()

I would like to change the size of the legend, but when I do size=0.5, it doesn't change anything.

Is there a way to change size of NWBIR74 and their numbers in the legend?

enter image description here

1 Answer 1

2

The solution code below:

library(tmap)
library(sf)
#> Linking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE
example(st_read)
#> 
#> st_red> nc = st_read(system.file("shape/nc.shp", package="sf"))
#> (...)

tm_shape(nc) + 
  tm_fill("NWBIR74")+
  tm_scale_bar()+
  tm_layout(legend.title.size = 3, legend.text.size = 0.5)

Created on 2022-12-10 with reprex v2.0.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.