Skip to content
Prev 671 / 29559 Next

How to set spplot background?

Hi,

The examples on http://r-spatial.sourceforge.net/gallery/ all have dark
grey backgrounds on them.  E.g. :

library(sp)
library(lattice) # required for trellis.par.set():
trellis.par.set(sp.theme()) # sets color ramp to bpy.colors()

data(meuse)
coordinates(meuse)=~x+y

## coloured points plot with legend in plotting area and scales:
spplot(meuse, "zinc", do.log = TRUE,
	key.space=list(x=0.2,y=0.9,corner=c(0,1)),
	scales=list(draw=T))

gives http://r-spatial.sourceforge.net/gallery/fig/fig01.png


What do I have to to do to make the plot have a lighter background?

Also, the later examples on http://r-spatial.sourceforge.net/gallery/ seem
to fail by not finding SpatialPolygons()  Should those examples be
revised?

meuse.sr =
SpatialPolygons(list(Polygons(list(Polygon(meuse.riv)),"meuse.riv")))

Dave