Skip to content

spplot.points: one panel per level of a factor

3 messages · Alexandre Villers, Edzer Pebesma

#
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I don't think you are missing something here -- spplot doesn't do that
much more than the underlying lattice functions, and in particular it
tries to plot attributes of spatial features, using panels for
different attributes. Your question seems to only address plotting
points, sth that spplot does not try to.

You did not say which spplot options you want to take advantage of,
but suppose you want to add some referencing (a polygon), and remove
axis labels and tics, you might want to use:

library(sp)
demo(meuse, ask = FALSE)
xyplot(y~x|ffreq, as(meuse, "data.frame"), asp="iso",
	panel = function(x,y,...) {
		sp.polygons(meuse.riv)
		# anything else you want to do in every panel
		panel.xyplot(x,y,...)
	},
	scales = list(draw = FALSE),
	xlab = NULL, ylab = NULL
)

Hth,
On 10/03/2013 10:25 PM, Alexandre Villers wrote:
- -- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of M?nster
Heisenbergstra?e 2, 48149 M?nster, Germany. Phone: +49 251
83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSTpCxAAoJEM1OCHCtOnfxc1cH/0+uuzPASfCHPv8FJoTI0rZL
gG2Jt1mKHWXe8XZo8aBLN8SBRRrATlabtwoJ3GKDOunLgZ0x2DiWR387J/KoqI0c
NmNNq2dijkv1pJEWrK6gBYW+yVU90US6lSs23wG1sLaAcq/yhalg2wNbgf2zhsGN
6RqIihAEvu7EQk/mDMsG5websyUT5llA+Dt9eO5jamAvmBO58xKghcAz0oB5OLEI
hkNy2du2Uy5/GG+RGNwP9cUQWO2gQ8PbfAlxxp+YiGnERhyCdQ8vcFGdhCD0iFJB
Vk8iFL4GJ9Z+ubmU5EoK6+Syo/r2Ki8yLT4bcbLV7A/ZSyCYBV3ljn1uDshJ1rI=
=3epv
-----END PGP SIGNATURE-----