Title

pos_wrap_multi(
  x0 = 0,
  y0 = 0,
  n = c(5, 8),
  ncol = 3,
  width = 1,
  spacing = 1,
  width_multi = ncol * width + spacing,
  height = width
)

Arguments

x0

numeric for x starting point for positioner

y0

numeric for y starting point for positioner

n

number of positions

ncol

number of columns before wrap

spacing

width between wrapped groups, defaulst to 1

width_multi

spacing for groups, defaults to width + spacing

Value

Examples

# just printing pos_wrap_multi(n = c(3, 4), ncol = 2)
#> x0 y0 #> 1 0 0 #> 2 1 0 #> 3 0 -1 #> 4 3 0 #> 5 4 0 #> 6 3 -1 #> 7 4 -1
pos_wrap_multi()
#> x0 y0 #> 1 0 0 #> 2 1 0 #> 3 2 0 #> 4 0 -1 #> 5 1 -1 #> 6 4 0 #> 7 5 0 #> 8 6 0 #> 9 4 -1 #> 10 5 -1 #> 11 6 -1 #> 12 4 -2 #> 13 5 -2
# in plot ggcanvas() + stamp_point(xy = pos_wrap_multi(n = c(5, 10), ncol = 4))