Skip to content

adding a background shape to ssplot

3 messages · Jon Loehrke, Edzer Pebesma, Tomislav Hengl

1 day later
#
Jon Loehrke wrote:
...
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