我想删除spplot
中变量名周围的框(在下面的示例中为“镉”,“铜”,...,或至少更改其桃红色。
library(sp)
rv = list("sp.polygons", meuse.riv, fill = "lightblue")
scale = list("SpatialPolygonsRescale", layout.scale.bar(),
offset = c(180500,329800), scale = 500, fill=c("transparent","black"), which = 4)
text1 = list("sp.text", c(180500,329900), "0", cex = .5, which = 4)
text2 = list("sp.text", c(181000,329900), "500 m", cex = .5, which = 4)
arrow = list("SpatialPolygonsRescale", layout.north.arrow(),
offset = c(181300,329800),
scale = 400, which = 4)
cuts = c(.2,.5,1,2,5,10,20,50,100,200,500,1000,2000)
spplot(meuse, c("cadmium", "copper", "lead", "zinc"), do.log = TRUE,
key.space = "right", as.table = TRUE,
sp.layout=list(rv, scale, text1, text2, arrow), # note that rv is up front!
main = "Heavy metals (top soil), ppm", cex = .7, cuts = cuts)
spplot调用网格图形,因此您可以使用par.settings为zcol(称为strips)传递其他参数。有关您可以传递的完整参数列表,请选中table 23.3 of lattice manual。您可以在如下所示的列表中指定它们:
my.settings <- list(
strip.background=list(col="lightblue"),
strip.border=list(col="transparent")
)
spplot(meuse, c("cadmium", "copper", "lead", "zinc"), do.log = TRUE,
key.space = "right", as.table = TRUE,
sp.layout=list(rv, scale, text1, text2, arrow), # note that rv is up front!
main = "Heavy metals (top soil), ppm", cex = .7, cuts = cuts,
par.settings=my.settings)