Skip to content

spplot specifying printing character (pch) broken?

2 messages · d.g.rossiter at utwente.nl, Edzer Pebesma

#
I believe some recent change to spplot has removed the possibility of specifying a printing character other than the default 16 (fill=T) or 1.

The following code produces a plot of an attribute of a SpatialPointsDataFrame:

require(gstat)
data(jura)
coordinates(jura.pred) <- ~Xloc + Yloc
spplot(jura.pred, zcol="Co", col.regions=bpy.colors(64))

In the past (as of 09-Feb-2012 if not later) the it was possible to specify a different printing character:

spplot(jura.pred, zcol="Co", col.regions=bpy.colors(64), pch=2)

and this is promised in the documentation of spplot:

 pch
     integer; plotting character to use; defaults to 16 if fill is TRUE, else 1

However now with sp 1.0-5, lattice 0.20-13, running under R 2.15.2, the last-shown command prints only some of the points, all in black; the legend shows no characters.

David Rossiter
University of Twente (NL) / Faculty ITC
3 days later
#
David, this is a bug that has now been corrected on r-forge.

Thanks for reporting,
On 02/02/2013 04:52 PM, d.g.rossiter at utwente.nl wrote: