A drop-in replacement for ggplot2::coord_cartesian() that draws the frame
hand-drawn: the panel gridlines and axis ticks are rendered as roughened
sketch grobs, so the frame matches the marks -- under any theme, not only
theme_sketch(). It reuses ggplot2's own gridline and axis layout and only
swaps how those elements are drawn, so limits, expansion, and clipping behave
exactly like coord_cartesian().
If TRUE (default), add the standard expansion around the data.
default
Is this the default coordinate system? Default FALSE.
clip
Should drawing be clipped to the panel ("on", default) or not
("off")?
roughness, bowing, n_passes
Sketch parameters for the frame. Gentle
defaults suited to gridlines (0.5, 0.5, 2).
seed
Integer seed for reproducible wobble. NULL uses
getOption("ggsketch.seed", 1L).
rough_grid, rough_ticks
Roughen the gridlines / axis ticks? Both default
TRUE; set one to FALSE to leave that element crisp.
Details
The panel border is a plot-level theme element (not part of the coordinate
system), so to roughen it as well, combine coord_sketch() with
theme_sketch(rough_frame = TRUE) or set
panel.border = element_sketch_rect(...).