Skip to contents

Hatch

Usage

bt_hatch(
  bertin,
  angle = 45,
  stroke = "#786d6c",
  strokeWidth = 2,
  strokeOpacity = 1,
  strokeDasharray = "none",
  spacing = 8,
  display = TRUE
)

Arguments

bertin

map object

angle

orientation of lines (degree)

stroke

stroke color

strokeWidth

stroke width

strokeOpacity

stroke opacity

strokeDasharray

stroke dash array

spacing

spacing between lines (pixel)

display

Boolean to allow to show or hide the layer. This parameter has no effect on the calculation of the extent

Value

a map object

Examples

library(sf)
world <- st_read(system.file("gpkg/world.gpkg", package = "bertin"),
                 layer = "world", quiet = TRUE)
bt_param(projection = "Eckert3", clip = TRUE) |>
  bt_outline() |>
  bt_layer(data = world, fill = "white") |>
  bt_hatch() |>
  bt_draw()