I want to make a graph by combining several maps, as shown in the attached image. But I need to create one legend (not four as shown) and also want to vary between 0 to 100.
I think it is possible, any suggestion in this regard would be great.
Del
d_dw <- tm_shape(d_pcahlsp) + tm_fill("dw_twts", breaks=c(0,10, 20, 30,40,50,60, 70, 80, 90, 100), Palette = "Reds",
title = "% Treated drinking water") +
tm_borders(alpha=.4) +
tm_layout(legend.text.size = 0.8, legend.title.size = 0.8, frame = FALSE, legend.outside = TRUE,
title = "Delhi")
Luk
l_dw <- tm_shape(l_pcahlsp) + tm_fill("dw_twts", breaks=c(0,10, 20, 30,40,50,60, 70, 80, 90, 100), Palette = "Reds",
title = "% Treated drinking water") +
tm_borders(alpha=.4) +
tm_layout(legend.text.size = 0.8, legend.title.size = 0.8, frame = FALSE, legend.outside = TRUE,
legend.show = TRUE, title= "Lucknow")
Mad
m_dw <- tm_shape(m_pcahlsp) + tm_fill("dw_twts", breaks=c(0,10, 20, 30,40,50,60, 70, 80, 90, 100), Palette = "Reds",
title = "% Treated drinking water") +
tm_borders(alpha=.4) +
tm_layout(legend.text.size = 0.8, legend.title.size = 0.8, frame = FALSE, legend.outside = TRUE,
legend.show = TRUE, title = "Madurai")
Tri
t_dw <- tm_shape(t_pcahlsp) + tm_fill("dw_twts", breaks=c(0,10, 20, 30,40,50,60, 70, 80, 90, 100), Palette = "Reds",
title = "% Treated drinking water") +
tm_borders(alpha=.4) +
tm_layout(legend.text.size = 0.8, legend.title.size = 0.8, frame = FALSE, legend.outside = TRUE,
legend.show = TRUE, title = "Thiruvananthapuram")
tmap_arrange(d_dw, l_dw, m_dw, t_dw, ncol = 2)