[R-sig-Geo] contour lines on a plot
Virgilio Gomez Rubio
Virgilio.Gomez at uclm.es
Mon Jan 19 18:16:53 CET 2009
Dear Maxime,
I have not been able to reproduce your example because I lack your data
file (file.txt). However, I believe that the problem is at
> spplot(p,zcol="K1.pred",col.regions=gray(0:100/100), cuts=40,
> sp.layout=list(pts), pretty=T)
> contour(p, add=T, nlevels=2)
You are combining lattice graphics (spplot()) and 'traditional' graphics
(contour()). A good alternative here is to pass the contour lines to
spplot via the sp.layout parameter. You can use ContourLines2SLDF to
convert contour lines to a SpatialLinesDataFrame.
Hope this helps.
Virgilio
More information about the R-sig-Geo
mailing list