3

Please, consider the following example:

library(tmap)
data("World")

tm_shape(World) +
  tm_polygons("HPI")

This gives me the following map:

enter image description here

My problem is the legend. The legend boxes that show the colors are squares that are directly next to each other. Is there a way to handle them so that they become rectangles with a spacing between them? Maybe something like this (it's a picture from a book to show the desired output - I can't provide code for this one):

enter image description here

lovalery
  • 4,524
  • 3
  • 14
  • 28
coleuch
  • 31
  • 5

0 Answers0