79728357

Date: 2025-08-07 09:30:35
Score: 1.5
Natty:
Report link

Not an answer but sharing a problem related to the topic, there no possibility to remove the legend frame when adding a legend trough tm_add_legend() and even within the tm_options settings with legend.frame=F it does not work either.

> packageVersion('tmap')
[1] ‘4.1’
> packageDate('tmap')
[1] "2025-05-12"

First I tried as specified here :

tm_shape(World)+
  tm_polygons(fill = 'area',fill.legend=tm_legend(frame = F))+
  tm_add_legend(frame=F,labels = c('lab1','lab2'),type = 'polygons',fill=c('red','green'),position=c('left','top'))

Even try the option with :

tm_shape(World)+
  tm_polygons(fill = 'area',fill.legend=tm_legend(frame = F))+
  tm_add_legend(fill.legend=tm_legend(frame=F),labels = c('lab1','lab2'),type = 'polygons',fill=c('red','green'),position=c('left','top'))
Reasons:
  • Blacklisted phrase (1): Not an answer
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Jerry