Releases: orijitghosh/ggsketch
Release list
ggsketch 2.0.0
ggsketch 2.0.0
CRAN release: 2026-07-17
The 2.0 series turns ggsketch from a line style into a drawing-medium simulator. This first piece is the engine that makes it possible.
Chicklet charts. New geom_sketch_chicklet() – a hand-drawn take on ggchicklet::geom_chicklet(). It stacks rounded “pill” segments with a small segment_gap between them and a solid fill by default; add coord_flip() for the classic horizontal layout. Built on geom_sketch_col(), so it inherits every fill style, drawing medium, and sketch parameter.
Repelled labels escape panel corners. The repel_layout() solver now picks its separation axis by the room left inside the panel bounds, so labels pressed into a corner fan out along the edge instead of being clamped back on top of each other (previously e.g. three overlapping boxes in a scatter’s corner).
Calendar axes read as calendars. geom_sketch_calendar() now labels the y axis with weekday names (honouring week_start) and the x axis with month names instead of raw grid numbers; set labels = FALSE to supply your own scales.
Saner default hachure pitch. When hachure_gap is NULL, sketch_polygon_grob() now picks the gap at draw time in device inches – 15% of the shape’s smaller drawn extent, clamped to [0.04, 0.4] – instead of geoms guessing in data units. Wide flat rectangles (Gantt/funnel/pyramid bars, long tiles) no longer degenerate into a few huge strokes escaping the outline, and geom_sketch_gantt()/funnel()/pyramid() drop their fixed 0.12 workaround pitch. An explicit hachure_gap is honoured unchanged, but default-gap output shifts slightly.
Rect geoms bend under nonlinear coords. geom_sketch_rect(), geom_sketch_tile(), and geom_sketch_col()/bar() now densify their boundaries before the coordinate transform, so bars under coord_polar() / coord_sketch_polar() curve into proper wedges and rings instead of straight-edged quads.
Radar legend fix. geom_sketch_radar() no longer leaks an NA key into a mapped discrete fill scale, so its colour and fill legends merge into one (previously two legends, one with a spurious NA entry).
Edge labels are never clipped. geom_sketch_bump(), geom_sketch_arc_diagram(), geom_sketch_parallel(), and geom_sketch_dendrogram() now reserve panel room for their end/leaf/axis labels (and the dendrogram’s rotated labels hang cleanly away from the tree), so nothing is cut off at the plot edge under theme_void().
The lightest engraved region always draws. scale_tone_continuous()’s default band is now c(0.15, 0.95) (was c(0.1, 0.95)), keeping the faintest mapped tone above the engraving ladder’s blank-paper threshold – previously the lightest geom_sketch_shade() region could disappear entirely.
Alluvial strata gaps. geom_sketch_alluvial() gains stratum_gap (default 0.02): a small vertical gap between adjacent strata so roughened boxes never overlap at their shared edge; 0 restores flush stacking.
Variable-width strokes (Layer 1 + Layer 2). stroke_ribbon() builds a hand-drawn stroke as a filled polygon ribbon offset around a centreline, so a line can taper to a point, swell with pressure, or vary like a broad calligraphic nib – effects grid cannot produce with a constant-lwd polyline. stroke_profile() supplies ready-made width profiles ("taper_in", "taper_out", "belly", "flat"), and sketch_stroke_grob() renders a path as variable-width ribbons, re-roughening the centreline at device resolution (with round or butt caps, optional width jitter for a dry edge, and a nib_angle for calligraphy). This is the foundation the forthcoming media (ink, brush, pencil, charcoal, calligraphy) are built on.
Drawing media on the path geoms. A new medium argument selects how a line is laid down: "pen" (the default – the classic constant-width double stroke, unchanged), or "ink", "brush", "pencil", "charcoal", "marker", "crayon", which render through the variable-width engine – tapered ink, brushy belly swells, grainy multi-pass pencil/charcoal, translucent marker, waxy crayon. Available on geom_sketch_line(), geom_sketch_path(), geom_sketch_segment(), and geom_sketch_step(); sketch_media() lists the options. Existing plots are unaffected (the default stays "pen").
Three more drawing media. "fountain_pen" (a crisp, wet line that pools slightly at the ends), "ballpoint" (a thin, even, faintly skipping stroke), and "pastel" (a broad, soft, grainy and translucent mark, lighter than charcoal) join the medium family and the scale_medium_discrete() palette.
Waterfall charts. geom_sketch_waterfall() floats each step’s delta (y) from the running total before it to the running total after it across the categories (x), with dotted hand-drawn connectors carrying the level over the gaps. Bars colour by direction (fill_increase / fill_decrease / fill_total, or map fill to after_stat(change) yourself), an optional measure = "total" aesthetic draws closing-total bars from zero, and any fill_style works (including "watercolor").
Gantt / timeline charts. geom_sketch_gantt() draws one roughened bar per task from x (start) to xend (end) on a discrete y – the whiteboard project-planning look. An optional progress aesthetic (0-1) overlays a slimmer, darker solid bar over the completed fraction; bars take rounded corners (corner_radius), dates on x and any fill_style.
Funnel and population-pyramid charts. geom_sketch_funnel() centres one bar per stage on zero with width equal to the stage’s value, so the shrinking bars read as drop-off, with translucent trapezoid connectors carrying each stage into the next. geom_sketch_pyramid() draws back-to-back bars mirrored about zero by a two-level side aesthetic – the population pyramid. Both take every fill_style.
Font-aware export helper. ggsketch_save() is a drop-in ggplot2::ggsave() wrapper that picks a device able to see fonts registered with register_sketch_font(): ragg for raster formats, svglite for SVG, cairo_pdf for PDF (the base pdf device misses registered fonts), and it warns PostScript users towards PDF – ending the “my handwriting font disappeared in the saved file” footgun.
One-call style presets. sketch_style() bundles a paper ground, a qualitative colour/fill palette tuned to it and (on ggplot2 >= 4.0) matching default geom ink into a single +-able object: p + sketch_style("chalkboard"). Presets: "notebook", "chalkboard", "blueprint", "field_notes" and "graphite"; sketch_styles() lists them, and palette = FALSE keeps your own scales.
Highlighter swipes and hand-drawn underlines. annotate_sketch_highlight() lays a wide translucent chisel-tip band (the new highlighter medium) over a region of interest in one call, and annotate_sketch_underline() draws a quick wobbly underline (strokes > 1 re-draws it for an emphatic scrawl).
Chalk and highlighter media. medium = "chalk" draws a broad, dry, flat-ended stroke with a faint halo of settled dust either side of the line – made for theme_sketch(paper = "chalkboard") with a lig...
ggsketch 1.6.0
roughnessis now a mappable aesthetic on the per-shape geoms. Map it per shape withaes(roughness = )(rescaled byscale_roughness_continuous()) or set a constant ongeom_sketch_col()/bar(),rect()/tile(),circle()/ellipse(),segment()/spoke(), and the point-basedjitter()/count().sketch_ellipse_grob()now takes a per-shape roughness vector. Defaults are unchanged, so existing plots render identically. Path-like geoms (line, path, area, density, smooth, step, reference lines) keeproughnessas a layer parameter.- Independent fill roughness and seed. Every fill-bearing geom now accepts
fill_roughnessandfill_seed, so the fill texture can be controlled separately from the outline.NULLkeeps the historical coupling, so existing plots render identically.
ggsketch 1.4.0
Rough theme frame, sketch colour scales, scribble fill, reproducible fonts, plus outline/colour bug fixes. See NEWS.md.