[R-sig-Geo] sp.text background
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Sun Nov 7 18:00:00 CET 2010
There might be multiple ways of doing this. The following stays in the
realm of using spatial elements, here a rectangular polygon which is
colored white and drawn after the grid map has been drawn.
library(sp)
data(meuse.grid)
gridded(meuse.grid) = ~x+y
x = c(179500,331000)
bx = cbind(c(x[1],x[1]+300,x[1]+300,x[1],x[1]),
c(x[2],x[2],x[2]+200,x[2]+200,x[2]))
p = SpatialPolygons(list(Polygons(list(Polygon(bx)), "ID")))
spl1 =list("sp.polygons", p, col = 0, fill='white',first=F)
spl2 =list("sp.text", x+150,"hello")
spplot(meuse.grid[3], sp.layout=list(spl1,spl2))
On 11/07/2010 09:02 AM, Alexandru Dumitrescu wrote:
> Dear list,
>
> For my daily precipitation maps I need to put on the spplot map the first
> maximum tree precipitation values.
> The only space left for that element it overlaps the border of
> a neighboring country.
> I am wondering if is there a way to add a background to sp.text element; I
> searched
> through all the sp.text args but I didn’t find a solution for adding a
> colored (white) background.
>
>
> Thank you,
> Alexandru Dumitrescu
>
> [[alternative HTML version deleted]]
>
>
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list