简体   繁体   中英

levelplot box line width R

Does any know how to change the line width of a levelplot graphic, especially that with multiple panels? The box line width should change alongside the tick marks. In base R one can use plot(x);box(lwd=10) .

Is this possible within levelplot?

Many thanks.

library(rasterVis)
mycolors=c("darkred","red3", "orange", "yellow", "lightskyblue", 
          "royalblue3","darkblue")
s <- stack(replicate(6, raster(matrix(runif(100), 10))))
levelplot(s, layout=c(3, 2), col.regions=mycolors, index.cond=list(c(1, 3, 5, 2, 4, 6)))

You can set the border line widths with the par.settings argument. For example:

levelplot(s, layout=c(3, 2), col.regions=mycolors, 
          index.cond=list(c(1, 3, 5, 2, 4, 6)), 
          par.settings=list(axis.line=list(lwd=3), strip.border=list(lwd=3)))

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM