I am trying to create a caption for a choropleth map in R with RStudio. However, the font size for the caption is too small now. Here is my code:
png(filename = "kidspoverty map_final.png", units = "px", width = 1920,
height = 1080, res = 300)
tm_shape(spatial_data) +
tm_fill("kidspoverty", style = "pretty", palette = "-RdYlBu",
title = "% of children living in poverty") +
tm_borders(lwd = 1, alpha = 1, col = "black") +
tm_layout(legend.outside = TRUE, legend.position = c("right", "bottom"), frame = F, inner.margins = c(0.07,0,0.01,0)) +
tm_compass(position=c("RIGHT","top")) +
tm_scale_bar(position=c("RIGHT","top")) +
tm_credits(expression(paste(bold("Figure 2."), " A choropleth map showing the spatial distribution of child poverty percentages in Inner London.")), position = c("LEFT","BOTTOM"))
dev.off()
I tried to increase the font size by adjusting size
in tm_credits()
, but it doesn't change the font size at all.
Therefore, I was wondering if there is a way to insert a line break, for example between "poverty" and "percentages", to enlarge the caption's font size. Thank you!
(I am new to RStudio, so if there is another way to increase the caption size, or a smarter method to include a partially bolded caption for tmap, I would be very grateful for your help.)