Hello,
I am struggling with the legend in tmap
I would like to have a legend on the bottom and horizontally but I am not able to achieve it.
Moreover, it is also ignoring the title of first shape I specify.
This is my code
tm_shape(shape)+
tm_polygons(col="gold3",
alpha=0.2,
title="Shape 1",
legend.is.portrait = FALSE,
legend.show=TRUE)+
tm_shape(out_arid_sf)+
tm_bubbles(col="fit_sperror",
size="fit_sperror",
style="cont",
alpha=0.5,
breaks=mybreaks,
midpoint = NA,
legend.size.show = FALSE,
palette=mypalette,
title.col="Fitted Values",
size.lim = c(min(out_arid_sf$fit_sperror),max(out_arid_sf$fit_sperror))) +
tm_layout(legend.outside = TRUE,
legend.title.size=1.5,
legend.text.size=1,
legend.outside.size = 0.35,
legend.outside.position = "bottom")
I found a similar post on stackoverflow but in my case the legend.is.potrait option does not work ..
Thanks for your help