私はmarmap
海洋保護区のプロットを持っていますが、非常に拡大されているため、米国の州 (マサチューセッツ州) の挿入図を含めようとしています。
現在、私のコードは次のとおりです。
library(marmap)
stellie <- getNOAA.bathy(lon1 = -70.8, lon2 = -69.9,
lat1 = 42.8, lat2 = 41.7, resolution = 1)
#area for marine sanctuary
blues <- colorRampPalette(c("purple","blue","cadetblue1","white"))
greens <- colorRampPalette(c("#00CC00", "#33CC33", "#009900", "#006633"))
#custom colours
plot(stellie, image = TRUE, land = TRUE, lwd = 0.4,
bpal = list(c(0, max(stellie), greens(100)),
c(min(stellie),0,blues(100))),
drawlabel = c(TRUE, FALSE, FALSE))
scaleBathy(stellie, deg = 0.17, x = "bottomleft", inset = 5)
#final plot
ボストンのこの広いエリアを挿入図として、または最初の地図と一緒に含めたいと思います
boston <- getNOAA.bathy(lon1 = -72, lon2 = -69.7,
lat1 = 43, lat2 = 41.3, resolution = 1)
plot(boston, image = TRUE, land = TRUE, lwd = 0.4,
bpal = list(c(0, max(boston), greens(100)),
c(min(boston),0,blues(100))),
drawlabel = c(TRUE, FALSE, FALSE))
これはおそらくggplotで行うのが最適だと思うので、都市名を含めることができますが、marmapファイルをggplotにインポートする方法がわかりません。