【发布时间】:2020-03-18 20:14:09
【问题描述】:
我想在我的主关卡中添加一个子图,类似于this image。我想要两张地图的纬度/经度轴,但我还没有设法找到一种方法来使用 levelplot 做到这一点。另外,我见过this question,但没有答案。 我对 subplot 和新的 par() 感到很困惑,所以我真的需要一些帮助。
library("raster")
library ("rasterVis")
library("viridis")
r <- raster(system.file("external/test.grd", package="raster"))#subplot
r2<-r/2 #main plot
ckey <- list(labels=list(cex=1.5), height=1,space='top')
levelplot(r2,colorkey=ckey,margin=FALSE,xlab="", ylab="",col.regions=viridis,at=seq(100,500, len=20),
scales=list(x=list(cex=1.5),y=list(cex=1.5))) #from this point, I do not know how to add a subplot
【问题讨论】:
标签: r raster subplot gridextra levelplot