Skip to contents

Compute or draw rough connected lines

Usage

rough_lines(x, y = NULL, hand = NULL)

draw_rough_lines(x, y = NULL, hand = NULL, ...)

Arguments

x, y

Coordinates as for graphics::lines().

hand

Hand-drawn geometry settings created with hand().

...

Graphics parameters passed to graphics::lines().

Value

A list with x, y, and id components describing roughened polyline geometry for each connected run.

Examples

y <- c(2, 5, 4, 7, 6, 8)
plot(1:6, y, type = "n")
draw_rough_lines(1:6, y, hand = human_hand(multi_stroke = 2))