Re: [R] adding text to spplot

2011-07-13 Thread Oscar Perpiñan Lamigueiro
Hi, help(spplot): The ‘sp.layout’ argument is either a single layout item, or a list with a layout items. A layout item is a list with its first argument the name of the layout function to be called: ‘sp.points’ for SpatialPoints, ‘sp.polygons’ for SpatialPolygons object,

Re: [R] adding text to spplot

2011-07-13 Thread Matevž Pavlič
pplot (just points and labels and a key on the right). any ideas? m -Original Message- From: Weidong Gu [mailto:anopheles...@gmail.com] Sent: Wednesday, July 13, 2011 4:03 PM To: Matevž Pavlič Cc: r-help@r-project.org; r-sig-...@r-project.org Subject: Re: [R] adding text to spplot You

Re: [R] adding text to spplot

2011-07-13 Thread Weidong Gu
You may need panel function spplot(enaD2, "var1.pred",sp.layout=pts, main = "globina 60 cm", sub="D2", col.regions=terrain.colors(64), contour=T, panel = function(x,y,z,subscripts,...) { panel.polygonsplot(x,y,z,subscripts,...) sp.text(coordinates(enaD2), enaD2$ime[subscripts]) } HTH Weidong Gu

[R] adding text to spplot

2011-07-13 Thread Matevž Pavlič
hi all, I have a plot to which i would like to add text labels. And i cant find a way...here is the code : enaD2<-idw(D2~1, loca=dva, newdata=grd) pts = list("sp.points", dva, pch = 20, cex=1.5, col = "darkred spplot(enaD2, "var1.pred",sp.layout=pts, main =