Skip to content
Prev 2605 / 29559 Next

Plotting point labels along with points using spplot sp.layout list

Thanks Felix, this is the answer that I was looking for!



points <- list("sp.points", Centroids, pch = 21,col="green")
polys <- list("sp.lines", Counties_lines, col="white")
ptLabels =
list("panel.text",LatLongs[,1],LatLongs[,2],labels=ss,col="white",pos=2)
print("plotting the grob")
browser()
grob2 = spplot(psImg, "band1", col.regions=greys,
sp.layout=list(points,ptLabels,polys),cuts=length(greys),
colorkey=FALSE,scales=list(draw=TRUE))
plot(grob2)

the complete example will soon be posted on my Web site:

http://nceas.ucsb.edu/scicomp/GISSeminar/UseCases/MapProdWithRGraphics/OneMapProdWithRGraphics.html

Regards, Rick R
Felix Andrews wrote:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reeves.vcf
Type: text/x-vcard
Size: 350 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20071001/5877be5f/attachment.vcf>