使用levelplot

时间:2016-03-11 13:32:05

标签: r background-color levelplot rastervis

我有一个分类数据(lulc)用于土地利用土地覆盖,有6个等级。我正在尝试使用levelplot

中的rasterVis绘制此数据
l<-as.factor(lulc)
rat <- levels(l)[[1]]
rat[["landcover"]] <- c("Agriculture", "Bare land", "Built-up", "Vegetation","Water","Wetland")
levels(lulc) <- rat
levelplot(lulc, col.regions=c("yellow","cyan","pink","green","lightblue","orange"), xlab="", ylab="")

但研究区域是沿海地区。因此,我想将NA显示为用“浅蓝色”代表的海洋。我试过panel.background="lightblue",但它没有改变情节中的任何内容。我得到的是以下; enter image description here

但我想跟随; enter image description here

1 个答案:

答案 0 :(得分:2)

尝试

Dim cdb As DAO.Database
Set cdb = CurrentDb
Dim qdf As DAO.QueryDef
Set qdf = cdb.QueryDefs("Passthru")
qdf.Connect = cdb.TableDefs("YourExistingLinkedTableName").Connect
qdf.ReturnsRecords = False
qdf.SQL = "SET IDENTITY_INSERT " & TheRestOfYourSqlCommand