0

It 's not a reprex. I have maps with very long titles. I put my legend them outside. The font size is very small and I can't control it. The argument title.size = 2 is not working.

 map_cp <- tm_shape(choro) +
        tm_polygons(col = "taux", style = "jenks",
                 legend.hist = TRUE) +
        tm_borders("#9E9E9E") +
  tm_shape(sgf_centro) +
  tm_symbols(col = "#f50057", alpha = 0.1, border.col = "#f50057",
  size = centro_var,
  perceptual = TRUE,
  scale = 2) +
   tm_layout(title = label$LIBELLE, title.size = 0.6,legend.outside = TRUE) 

map_cp

enter image description here

Wilcar
  • 2,349
  • 2
  • 21
  • 48

1 Answers1

2

I found a solution : using main.title function.

 map_cp <- tm_shape(choro) +
     tm_polygons(col = "taux", style = "jenks",
                 legend.hist = TRUE) +
     tm_borders("#9E9E9E") +
tm_shape(sgf_centro) +
tm_symbols(col = "#f50057", alpha = 0.1, border.col = "#f50057", size = 
 sgf_var, perceptual =TRUE, scale = 2) +
tm_layout(main.title = label$LIBELLE, main.title.size = 1,legend.outside = TRUE) 


 print(map_cp)

enter image description here

Wilcar
  • 2,349
  • 2
  • 21
  • 48