RC RANDOM CHAOS

Gribouille 0.3.0 adds one-argument guide control to Typst's ggplot-style plotting

· via Hacker News

Original source

Gribouille 0.3.0: A Grammar of Graphics for Typst

Hacker News →

Gribouille, a spare-time, unfunded port of the grammar-of-graphics idea to the Typst typesetting system, has shipped version 0.3.0. The release is smaller in scope than the previous one but focuses on ergonomics. The marquee change is guide control: a single guides(x: none) call now hides an axis’s tick marks and labels without forcing users to dig into theme internals, while leaving the axis line, grid, and title intact. The same syntax extends to radial coordinates, where guides(theta: none) drops the whole angular axis and guides(r: none) removes only the radial labels.

Several defaults and APIs also changed. compose() now takes a theme: parameter that styles shared chrome and cascades into untheme’d panels, so a single theme can govern a multi-panel figure. Two breaking changes accompany it: deferred plotting moves from plot(..., defer: true) to a standalone defer(plot, ...) helper, and panels inside a composition no longer set their own width and height. Area charts (geom-area()) now stack by default and resample groups onto a shared grid when their x values differ, and annotate() gains a clip: flag so marks can deliberately overflow the panel for insets and margin labels.

The bulk of the work, as in 0.2, is bug fixes rather than features—mostly around legend layout, alignment, and statistical/scale correctness (binned-density now reports fraction-of-total to match ggplot2, sqrt/log10 transforms validate their domains, reversed axes no longer drop rows). The package also now ships Tinymist-friendly docstrings for inline editor documentation. The maintainer notes the API is still settling, welcomes bug reports, but is not accepting pull requests for now.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.