tm_shape: Shape (spatial object) specification

View source: R/tm_shape.R

tm_shapeR Documentation

Shape (spatial object) specification

Description

Specify a shape, which is a spatial object from one of these spatial object class packages: sf, stars, or terra.

Usage

tm_shape(
  shp,
  bbox = NULL,
  crs = NULL,
  is.main = NA,
  name = NULL,
  unit = NULL,
  filter = NULL,
  ...
)

Arguments

shp

Spatial object

bbox

Bounding box of he map (only used if is.main = TRUE)

crs

CRS to which shp is reprojected (only used if is.main = TRUE)

is.main

Is shp the main shape, which determines the crs and bounding box of the map?

name

Name of the shape

unit

Unit of the coordinates

filter

Filter features

...

to catch deprecated arguments from version < 4.0

Examples

tm_shape(World, crs = "+proj=robin", filter = World$continent=="Africa") + 
	tm_polygons()

r-tmap/tmap documentation built on June 23, 2024, 9:58 a.m.