Description Usage Details Examples
Return a matrix appropriate for the layout
of maps for 9 regions that are to scale
1 |
The matrix returned is sized such that the longitude:latitude ratio is not distorted within a region (approximately). Furthermore, the sizes of the regions are to scale. One exception is that the Southeast US takes up a 3x3 grid instead of a 2x2, making is roughly double the size it should be (although lon-lat in this region are still in proportion). Also, the regions are arranged roughly according to their true geographic arrangement.
The functions expects that regions will be plotted in a specific order. That order is: c('ebs','ai','goa','wctri','gmex','sa','neus','shelf','newf')
.
Note that "wcann" is excluded. It cannot be simply substituted in place of "wctri", either, because the latitudinal extent is greater for "wcann" than for "wctri".
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # subset data to unique lon-lat
d_ll <- data_all[,list(reg,lon,lat)]
setkey(d_ll, reg, lon, lat)
d_ll <- unique(d_ll)
# device dimension ~ layout matrix dimension
# i.e., 3:7 (height:width)
dev.new(height=3, width=7)
par(mar=c(0.5,0.5,0.5,0.5), mgp=c(0.5,0.1,0), tcl=-0.1, cex=1, ps=6)
layout(trawl_layout())
for(r in 1:9){
tr <- c('ebs','ai','goa','wctri','gmex','sa','neus','shelf','newf')[r]
d_ll[reg==tr,plot(lon,lat,main=reg[1])]
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.