Learn R Programming

tmap (version 0.7)

tm_borders: Draw polygon borders

Description

Creates a tmap-element that defines the borders of the polygons. Line color, width, and type can be set.

Usage

tm_borders(col = "grey40", lwd = 1, lty = "solid", alpha = NA)

Arguments

col
line color
lwd
line width (see par)
lty
line type (see par)
alpha
transparency number between 0 (totally transparent) and 1 (not transparent). By default, the alpha value of the col is used (normally 1).

Value

See Also

../doc/tmap-nutshell.html{vignette("tmap-nutshell")}

Examples

Run this code
data(Europe)
data(NLD_prov)
data(NLD_muni)

tm_shape(Europe) + tm_borders()

tm_shape(NLD_muni) +
	tm_fill(col="population", convert2density=TRUE, style="kmeans") +
	tm_borders("grey25", alpha=.5) + 
tm_shape(NLD_prov) +
	tm_borders("grey40", lwd=2) +
	tm_layout_NLD(title="Population (per km2)", bg.color="white", draw.frame = FALSE)

Run the code above in your browser using DataLab