1

我需要绘制一张全球径流图。我想在比例尺上以较小的数量查看更多细节。就目前而言,您可以看到 0-500 的配色方案非常拥挤且难以看到。有没有办法可以在比例尺上设置 0-50,50-100, 100-200, 200-300, 300-400, 400-500, 500-1000,1000-2000 的均匀空间?

这是一个例子

library(raster)
library(rasterVis)
library(lattice)
a1<-c(1,2,-4,100,250,500,-50,20,400,1000,1900,-1500,15,150,600,-850,8,-65,43,900,25,350,600,-550,45)
matrixa1<-matrix(a1,5,5)
rastera1<-raster(matrixa1)

sbreak<-c(-2000,-1000,-500,-400,-300,-200,-100,-50,0,50,100,200,300,400,500,1000,2000)
col.l <- colorRampPalette(c('darkblue','blue4','blue3','blue1','blue','deepskyblue','cyan','grey70','grey88','yellow1','orange',
                        'darkorange1','darkorange2','red','red3','darkred'))(100)
print(levelplot(rastera1,margin=FALSE,col.regions=col.l,main="test",
            at=sbreak,par.settings=list(layout.heights=list(xlab.key.padding=2),col=col.l)))

例子

4

0 回答 0