tm_bubble colour of the legend does not match the colour of the map

Hi ,
I need help to make the legend of my map displaying the right colour (gray10)
in the legend as defined in tm_bubble instead of the standard gray ..
Can anyone help ?

tm_shape(allpoints) + 
  tm_bubbles(size = "v1", alpha = 0.05, 
             sizes.legend=c(5,15,25,35,45,55), 
             sizes.legend.labels=c("5","15","25","35","45","55"),# vector of labels for that correspond to sizes.legend
             col = "gray10", 
             border.col = "gray10", 
             border.lwd = 0.3, 
             legend.col.show = TRUE,
             title.size = "My points") + 
  tm_layout(legend.outside = TRUE,
            legend.title.size=1.5,
            legend.text.size=1,
            legend.outside.position = "bottom")

Hi @angela_italy
Try addling the argument

aes.color(fill=“grey10”)

to the legend section.

Hi I tried adding aes.color = c(fill="gray10") inside tm_layout but it does not work .. it's ignored .. could you please tell me where it should be added?

Should that be a name of that column? e.g. in the example, 'pop2010' and 'growth' are both columns.

Map layer: symbols — tm_symbols • tmap (r-tmap.github.io)

I do not understand what you mean .. could you please tell me how my code should be modified in your opinion_

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.