tmap
tmap copied to clipboard
legend.is.portrait = FALSE not available for tm_bubble
Hi I would like to have a horizontal legend when using tm_bubble
however it seems that the option legend.is.portrait is not available for this function.
Is there a workaround to create a horizontal legend with tm_bubble ?
Thanks
Angela
Hi @anjelinejeline, you could try legend.col.is.portrait = T or legend.size.is.portrait = T and see if it takes them. col or size will depend on if the legend is based on the bubble sizes or colors.
This was not available in tmap3 in view mode. Is that what you are referring to?
Anyway, this is the plot mode in tmap4:
tm_shape(metro) +
tm_bubbles(size = "pop2020",
fill = "pop2010",
size.legend = tm_legend(orientation = "landscape", stack = "vertical"),
fill.legend = tm_legend(orientation = "landscape"))

Created on 2024-03-07 with reprex v2.1.0
and view mode: