【问题标题】:How to remove the box frame in “levelplot” in R package “rasterVis”如何删除R包“rasterVis”中“levelplot”中的框框
【发布时间】:2014-06-11 21:05:43
【问题描述】:

我想删除栅格数据集的“levelplot”图中的框框。不知道怎么弄。

library(raster)
library(rasterVis)

f <- system.file("external/test.grd", package="raster")
r <- raster(f)
s <- stack(r, r+500, r-500)
levelplot(s, contour=TRUE)
levelplot(s)
levelplot(s,box=FALSE,axes=FALSE) # It doesn't work.

【问题讨论】:

    标签: r raster lattice figure rastervis


    【解决方案1】:

    [编辑:添加的数字]

    ?wireframe的最后一个例子中描述了你想要实现的目标

    levelplot(s, contour = TRUE, par.settings = list(axis.line = list(col = "transparent")), 
              scales = list(col = "black"))`
    

    如果要去除条形背景和颜色:

    levelplot(s, contour=TRUE, par.settings = list(axis.line = list(col = "transparent"), 
              strip.background = list(col = 'transparent'), 
              strip.border = list(col = 'transparent')), 
              scales = list(col = "black"))`
    

    【讨论】:

    • 嗨,这真的很有用,但对我来说,轴刻度正在被删除,使用您使用的确切代码,知道为什么吗?谢谢
    猜你喜欢
    • 1970-01-01
    • 2015-06-06
    • 2013-01-06
    • 1970-01-01
    • 1970-01-01
    • 2021-06-23
    • 2018-09-22
    • 2020-10-25
    • 1970-01-01
    相关资源
    最近更新 更多