[R-sig-Geo] spplot -> sp.layout -> sp.text - only one "text" at the same time?

Edzer J. Pebesma edzer.pebesma at uni-muenster.de
Sun Nov 11 13:45:31 CET 2007


Ingo, that makes sense.

I committed a change to sp (in cvs), such that something like

spplot(meuse["zinc"],sp.layout=list("sp.text",coordinates(meuse),1:155))

works (although the plot of course does not make much sense)

It will be in the next release.
--
Edzer

Ingo Holz wrote:
> Hi,
>
>  I am using spplot() and want to label points in the produced map by using 
> sp.layout.
>
>  SPolyDF = a SpatialPolygonsDataFrame
>  SPointsDF = a SpatialPointsDataFrame
>
>  Something like this:
>
>  l1 <- list("sp.text", coordinates(SPointsDF[,1]), SPointsDF[["Name"]][1])
>  spplot(SPolyDF[, "Name"], sp.layout = list(l1))
>
>  This works fine for one point. It seems it is only possible to label one point 
> at the same time, but not to do something like this:
>
>  l1 <- list("sp.text", coordinates(SPointsDF), SPointsDF[["Name"]])
>  spplot(SPolyDF[, "Name"], sp.layout = list(l1))
>
>  Is there a way to label all points of the SpatialPointsDataFrame at the same 
> time? Is it possible with sp.points?
>
> Thanks, Ingo
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>




More information about the R-sig-Geo mailing list