extrude: Extruded map (beta version)

Description Usage Arguments Examples

View source: R/extrude.R

Description

Extruded map (beta version)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
extrude(
  x,
  var,
  k = 1,
  lwd = 1,
  col = "white",
  border = "black",
  regular = FALSE,
  add = FALSE
)

Arguments

x

an sf object (polygon or multipolygons).

var

name of the numeric field in df to plot.

k

numeric value ti adjust the height of the extruded polygons

lwd

line thickness

col

One color or the field name containg colors for each polygons

border

color border

regular

use TRUE with regular grids for faster calculation

add

whether to add the layer to an existing plot (TRUE) or not (FALSE).

Examples

1
2
3
4
library(sf)
us <- st_read(system.file("us.gpkg", package="mapextrud"))
basemap <- deform(us)
extrude(basemap, var = "pop2019" , k = 1, col = "white")

neocarto/mapextrud documentation built on April 10, 2020, 12:13 a.m.