[R-sig-Geo] spplot - polygons with colored borderlines
Roger.Bivand at nhh.no
Tue May 26 14:36:01 CEST 2009
On Tue, 26 May 2009, Ingo Holz wrote:
> I am using function spplot (library sp) to plot polygons:
> spplot(SPDF, "var", col.regions=topo.colors(100))
> SPDF is a SpatialPolygonsDataFrame
> Some of my polygons are very small and you can not see the color of the
> polygon (only the black borderlines).
> I could use
> spplot(as(SPDF, "SpatialLinesDataFrame"), "variable1",
> to get colored borderlines.
> Is there a possibility to get filled colored polygons with borderlines
> in the same color?
Although it isn't obvious, you use the col= argument passed through to
grid.polygon() used internally - see ?gpar after loading the gris package.
You'll find that col="transparent" is OK:
scot_BNG <- readOGR(system.file("vectors", package = "rgdal"),
spplot(scot_BNG, "SMR", col="transparent")
Hope this helps,
> Thank you for your help.
> Best wishes,
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo