adding a background shape to ssplot
Jon Loehrke wrote:
Greetings and Happy Holidays!
...
#However I can seem to pass the polygon colors argument through spplot
spplot(nc1, c("f","g"), col.regions=brewer.pal(10, "Set3"),
scales=list(draw = TRUE),
panel=function(...) {
panel.mapper()
sp.polygons(nc1)
}
)
A better panel function would be this:
spplot(nc1, c("f","g"), # col.regions=brewer.pal(10, "Set3"),
scales=list(draw = TRUE),
panel=function(...) {
panel.mapper()
panel.polygonsplot(...)
}
)
see
getMethod("spplot", "SpatialPolygonsDataFrame")
to find out how the appropriate spplot method does it.
I am worried, however, about the absence of the last 5 colors and factor
levels f-j.
--
Edzer