(I posted this on Stackoverflow, but thought this may be a better venue)
I am trying to generate a figure containing six choropleth maps in R. Currently my code looks something like this:
library(rgdal)
library(GISTools)
# code that loads data needed to generate choropleth maps not shown
par(mfrow = c(3,2), mar=c(0,0,0,0), oma=c(0,6,6,0))
choropleth(mn_county, mn_county$emppct.tert.2006, shades)
mtext( 'Secondary', side=3, line=2)
mtext( '1998', side=2, line=2)
choropleth(mn_county, mn_county$emppct.tert.2006, shades)
# choropleth maps are repeated in this post for simplicity
mtext( 'Tertiary', side=3, line=2)
choropleth(mn_county, mn_county$emppct.tert.2006, shades)
mtext( '2006', side=2, line=2)
choropleth(mn_county, mn_county$emppct.tert.2006, shades)
choropleth(mn_county, mn_county$emppct.tert.2006, shades)
mtext( '2014', side=2, line=2)
choropleth(mn_county, mn_county$emppct.tert.2006, shades)
The problem is, even though I set margins mar
to be zero throughout, there are still big gaps between the columns (see below). Not just between the choropleth maps, but also between the row headings (1998, 2006, 2014) and the maps.
How can I reduce this wide space?
P.S. I've been trying to find a GIS shapefile which I can directly pull off from the internet (I don't think I can attach shapefiles in posts), but can't find one. Any idea how I can circumvent this problem?
maptools
package if you want to create a reproducible example, see, eg, the help for choropleth for usage.