A ggplot2 geom that draws jittered, smoothed paths or fuzzy circles. It expects aesthetics like `x`, `y`, and either `xend`/`yend` (for segments) or `diameter` (for circles). Additional aesthetics (colour, alpha, linewidth, linetype) are respected.
geom_xkcdpath(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
xjitteramount = 0.01,
yjitteramount = 0.01,
wobble = 1,
seed = NULL,
mask = TRUE,
show.legend = NA,
inherit.aes = TRUE
)Aesthetic mapping.
Data frame.
The statistical transformation to use on the data for this layer.
Position adjustment.
Other arguments passed on to layer().
Horizontal jitter amount for segments, in data units.
Vertical jitter amount for segments, in data units.
Scalar multiplier applied to both jitter amounts. `1` leaves the jitter amounts unchanged; `0` draws straight lines.
Optional integer. When supplied the wobble is reproducible: the same `seed` always yields the same path. Each row of `data` is offset from `seed` so rows still differ from one another. The global RNG state is left untouched.
Logical; if TRUE draws a thicker white mask path under the main path.
Show legend.
Whether to inherit aesthetics from the plot.