tm_sf {tmap} | R Documentation |
Draw simple features
Description
Creates a tmap-element
that draws simple features. Basically, it is a stack of tm_polygons
, tm_lines
and tm_dots
. In other words, polygons are plotted as polygons, lines as lines and points as dots.
Usage
tm_sf(
col = NA,
size = 0.02,
shape = 19,
lwd = 1,
lty = "solid",
alpha = NA,
palette = NULL,
border.col = NA,
border.lwd = 1,
border.lty = "solid",
border.alpha = NA,
group = NA,
...
)
Arguments
col |
color of the simple features. See the |
size |
size of the dots. See the |
shape |
shape of the dots. See the |
lwd |
width of the lines. See the |
lty |
type of the lines. See the |
alpha |
transparency number. See |
palette |
palette. See |
border.col |
color of the borders. See |
border.lwd |
line width of the borders. See |
border.lty |
line type of the borders. See |
border.alpha |
transparency of the borders. See |
group |
name of the group to which this layer belongs in view mode. Each group can be selected or deselected in the layer control item. Set |
... |
other arguments passed on to |
Value
See Also
Examples
data(World)
World$geometry[World$continent == "Africa"] <-
sf::st_centroid(World$geometry[World$continent == "Africa"])
World$geometry[World$continent == "South America"] <-
sf::st_cast(World$geometry[World$continent == "South America"],
"MULTILINESTRING", group_or_split = FALSE)
tm_shape(World) +
tm_sf()