Skip to contents

Provides 'ggplot2' geoms that render with a hand-drawn, sketchy aesthetic: roughened strokes, double-pass lines, and hachure, cross-hatch, zigzag, and dots fill patterns. Implemented as pure-R 'grid' grobs wrapped in 'ggproto' geoms, composable with aes(), stats, scales, and faceting. Works on every R graphics device (PDF, PNG, SVG, screen) with no browser dependency. Algorithms are reimplemented from the published 'rough.js' algorithm description (Shihn, 2020, https://shihn.ca/posts/2020/roughjs-algorithms/) and Wood and others (2012, doi:10.1109/TVCG.2012.262 ); see the NOTICE file in the package sources for attribution.

Options

ggsketch.seed

The seed a sketch layer uses when its seed is NULL. Default 1L.

ggsketch.base_family

The default base_family of theme_sketch(). Default "", the device font; "auto" uses the handwriting face sketch_font() returns.

ggsketch.max_strokes

The most strokes one fill grob draws (a single bar or tile, or a layer's shapes in one panel). Default 20000. A fill that would draw more, from a tiny hachure_gap, a very large device or thousands of hatched shapes, has all its gaps widened by one factor until it fits, with a warning (shown at most once every 8 hours). Inf turns the cap off.

ggsketch.tremor

Drift and fatigue in the drawing hand, a sketch_tremor(). Default NULL: none, so strokes draw as they always have.

Author

Maintainer: Arijit Ghosh arijitghosh2009@gmail.com

Authors: