I created a map that has only has a value of 1 in the column "labour". The issue I am getting is that the legend shows up as in 0.2 scale (image below).
this is the code I used
library(tmap)
tmap_mode("plot")
v11<-tm_shape(settingmap)+
tm_polygons("Construction", palette= "Reds",
colorNA="white",
showNA=FALSE)+
tm_shape(settingmap)+
tm_bubbles(size="Labour",col="blue")+
tm_shape(settingmap)+
tm_bubbles(size="Capital",col="yellow")+
tm_shape(worldmap2) +
tm_borders(col = "grey",lwd = 0.5)+
tm_layout(bg.color = "white")+
tm_layout(frame = TRUE,outer.margins=c(.05,0,.05,0), inner.margins=c(0,0,.02,0), asp=0,
legend.outside=TRUE,
legend.position=c("right","bottom"),
title.position = c('right','top'))
# legend.stack = "horizontal")
v11
I replaced the tm_bubble of labour in hopes to get what I wanted but I got an error:
tm_bubbles(size="Capital",col="yellow",
style="fixed",
breaks=c(1),
labels(1))
Error: symbol shape(s) ('shape' argument) is/are neither numeric nor valid variable name(s)
How can I achieve only one bubble that shows up in the legend but as the smallest size in the range but with 1 ?
something like this: