Learn R Programming

ggpattern (version 0.1.3)

create_stripes_sf: Create a sf MULTIPOLYGON object where each polygon is an individual stripe.

Description

The stripes are created as polygons so that when clipped to rects/polygons, the ends of the stripe are clipped correctly to the boundary.

Usage

create_stripes_sf(
  angle,
  spacing,
  density,
  xoffset = 0,
  yoffset = 0,
  aspect_ratio
)

Arguments

angle

angle of orientation (degrees)

spacing

spacing in grid 'npc' coordinates. Usually in range [0, 1]

density

fill fraction. Number in range [0, 1]

xoffset

offset the pattern creation origin.

yoffset

offset the pattern creation origin.

aspect_ratio

aspect_ratio

Value

`sf` multipolygon object