I am new to programming and am currently enrolled in an introductory spatial analysis course which uses R. The following code yields the tmaps included below. How can I center the title for each tmap as well as position the legend on the top right without laying over top the maps themselves?
Thank you very much for your assistance.
ga1 = tm_shape(a2georgia) +
tm_polygons('PctBlack', style='quantile', breaks=c(4.98,11.75, 22.35,27.64, 32.55, 40.06, 48.18, 79.64),
n=8, palette=c('lightblue','khaki1', 'red3'), title='Quantiles(8)',
border.col='grey27', alpha=.9) +
tm_layout(legend.position = c("right", "top"), title= '% of Population of Black Race', title.position = c('right', 'top'))
ga_cartogram <- cartogram_cont(a2georgia, "PctBlack", itermax=5)
ga2 = tm_shape(ga_cartogram) +
tm_polygons("PctBlack", style='quantile', breaks=c(4.98,11.75, 22.35,27.64, 32.55, 40.06, 48.18, 79.64),
n=8, palette=c('lightblue','khaki1', 'red3'), title='Quantiles(8)',
border.col='grey27', alpha=.9) +
tm_layout(legend.position = c("right", "top"), title= '% of Population of Black Race', title.position = c('right', 'top'))
tmap_arrange(ga1,ga2)
main.title.position
with possible valuecenter
. Have you looked into that? – Ibo