Skip to contents

Package

ggsketch ggsketch-package
ggsketch: Grammar-Native Hand-Drawn Geoms for ggplot2

Lines & points

Sketchy paths, connected lines, and roughened-marker scatter points.

GeomSketchLine geom_sketch_line()
Sketchy line geom
GeomSketchPath geom_sketch_path()
Sketchy path geom
GeomSketchPoint geom_sketch_point()
Sketchy point geom
geom_sketch_jitter()
Sketchy jittered points
geom_sketch_count()
Sketchy count geom
geom_sketch_function()
Sketchy function curve
GeomSketchRug geom_sketch_rug()
Sketchy marginal rug

Bars, tiles & rectangles

The signature filled look — roughened outlines with hachure-style fills.

Distributions

geom_sketch_histogram() geom_sketch_freqpoly()
Sketchy histogram and frequency polygon
geom_sketch_density()
Sketchy density geom
GeomSketchViolin geom_sketch_violin()
Sketchy violin plot
GeomSketchBoxplot geom_sketch_boxplot()
Sketchy boxplot
geom_sketch_bin2d() geom_sketch_bin_2d()
Sketchy 2-D bin heatmap
GeomSketchHex geom_sketch_hex()
Sketchy hexagonal heatmap

Contours & 2-D density

geom_sketch_contour()
Sketchy contour lines
geom_sketch_density2d() geom_sketch_density_2d()
Sketchy 2-D density contours

Models & quantiles

geom_sketch_quantile()
Sketchy quantile regression lines
geom_sketch_qq() geom_sketch_qq_line()
Sketchy quantile-quantile plot

Areas, ribbons & curves

Intervals & uncertainty

Reference lines

Circular & composed

Text, annotations, theme & fonts

geom_sketch_text() geom_sketch_label()
Sketchy text and labels
annotate_sketch()
Sketchy annotations
GeomSketchBracket geom_sketch_bracket()
Sketchy significance / comparison brackets
theme_sketch()
A hand-drawn theme for ggplot2
ggsketch_check_fonts()
Check for optional handwriting fonts
register_sketch_font()
Register a handwriting font for reproducible sketch text

Sketch frame & colour scales

Hand-drawn theme elements (gridlines, panel border, axis ticks) and a matching paper-and-ink colour palette.

element_sketch_line() element_sketch_rect()
Hand-drawn theme elements
scale_colour_sketch() scale_color_sketch() scale_fill_sketch() scale_colour_sketch_c() scale_color_sketch_c() scale_fill_sketch_c()
Sketch colour and fill scales
scale_roughness_continuous() scale_roughness()
Continuous scale for the sketch roughness aesthetic
sketch_palette()
The ggsketch qualitative colour palette

Legend keys

The sketchy draw_key functions wired into every geom.

Building blocks (grid grobs — Layer 2)

Lower-level grobs that re-roughen in device space inside makeContent().

sketch_path_grob()
Create a sketchy path grob
sketch_polygon_grob()
Create a sketchy polygon grob with optional hachure fill
sketch_ellipse_grob()
Create a sketchy ellipse / circle grob

Core geometry (Layer 1 — pure, no grid/ggplot2)

The number-to-number routines that produce the hand-drawn coordinates.

roughen_polyline()
Roughen a polyline (multiple connected segments)
rough_ellipse()
Roughen an ellipse into one or more sketch stroke paths
rough_bezier()
Roughen a cubic Bézier curve
hachure_fill()
Fill a polygon with hachure lines using the AET scan-line algorithm
sketch_fill()
Dispatch fill-style to the appropriate Layer-1 fill function
curve_fill()
Flatten a closed Bézier boundary to a polygon, then fill