### Name: spplot
### Title: Lattice (trellis) plots for spatial data
### Aliases: spplot spplot.grid spplot.rings spplot.points
###   layout.north.arrow layout.scale.bar mapLegendGrob sp.theme
### Keywords: dplot

### ** Examples

library(lattice)
trellis.par.set(sp.theme()) # sets bpy.colors() ramp
data(meuse)
coordinates(meuse) <- ~x+y
l2 = list("SpatialPolygonsRescale", layout.north.arrow(), offset = c(181300,329800), 
        scale = 400)
l3 = list("SpatialPolygonsRescale", layout.scale.bar(), offset = c(180500,329800), 
        scale = 500, fill=c("transparent","black"))
l4 = list("sp.text", c(180500,329900), "0")
l5 = list("sp.text", c(181000,329900), "500 m")

spplot(meuse, c("ffreq"), sp.layout=list(l2,l3,l4,l5),col.regions="black",pch=c(1,2,3),
        key.space=list(x=0.1,y=.95,corner=c(0,1)))
spplot(meuse, c("zinc", "lead"), sp.layout=list(l2,l3,l4,l5, which = 2),
        key.space=list(x=0.1,y=.95,corner=c(0,1)))

if (require(RColorBrewer)) {
        spplot(meuse, c("ffreq"), sp.layout=list(l2,l3,l4,l5),
                col.regions=brewer.pal(3, "Set1"))
}



