I am having some trouble with getting a certain plot layout when using the maps package. Here is what I am attempting:
library(maps)
library(mapdata)
aa <- rep(1,5); ab <- c(2,3,1,1,1)
mat <- rbind(aa,aa,aa,ab)
layout(mat)
map('state', mar=c(0,0,0,0))
map('worldHires', region='USA:Alaska', xlim=c(-175,-120))
map('worldHires', region='Hawaii', xlim=c(-161,-154.5))
Here is the error I receive:
Error in plot.new() : plot region too large
Usually I mess with the margins to resolve this error, but that doesn’t seem to be working. Any ideas?
You can resolve this by setting the margins before plotting each new map:
via https://stat.ethz.ch/pipermail/r-help/2006-September/113030.html