Feature matrix
Coverage of the ggplot2 and plotnine surface in Gribouille.
Context
Gribouille is a Typst package that implements a grammar of graphics on top of CeTZ. This page is the canonical coverage table: one row per public ggplot2 symbol, using the ggplot2 reference index as the axis. Status reflects what is currently in the package; Priority orders the remaining work.
Legend for Status:
- β implemented.
- π‘ partial or stubbed.
- β¬ missing.
- β out of scope for a static Typst backend (reason in Notes).
Legend for Priority (used to order future work):
- P1 unlocks common plots and blocks other work.
- P2 broadens expressiveness once P1 lands.
- P3 nice-to-have or niche.
- P4 deferred to the very end of the roadmap: requires a wasm helper or heavy numerical code that Typst cannot express natively. Wasm is a last resort, added only if a P4 feature is really needed and no native workaround exists. Until then every P4 row sits behind everything in P1 to P3.
- β not planned.
How gribouille currently maps to ggplot2
| Concept | ggplot2 form | gribouille form |
|---|---|---|
| Plot constructor | ggplot(data, aes(...)) + layer + scale + theme. |
plot(data:, mapping:, layers:, scales:, coord:, facet:, theme:, width:, height:). |
| Layer addition | + geom_point(). |
layers: (geom-point(), ...). |
| Aesthetic mapping | aes(x = a, y = b, colour = c). |
aes(x: "a", y: "b", colour: "c"). |
| Stat override | stat = "bin" on a geom. |
stat: key on the layer dict, dispatched via src/stat/apply.typ. |
| Theme composition | theme_minimal() + theme(...). |
theme: theme-minimal() (dict merged by merge-theme). |
Feature matrix
Plot basics
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
ggplot() |
plot(...). |
β | β | β |
aes() |
aes(...). |
β | β | Accepts x, y, colour, fill, size, alpha, linewidth, stroke, shape, linetype, group, label, xmin/xmax/ymin/ymax, xend/yend, xintercept/yintercept/slope, plus ggforce-style x0/y0/a/b/angle for geom-ellipse. |
%+% / add_gg() |
β | β | β | Typst has no lazy plot object; composition is via function args. |
ggsave() |
β | β | β | Typst owns the output pipeline. |
qplot() / quickplot() |
β | β | β | Deprecated upstream. |
Geoms
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
geom_point() |
geom-point. |
β | β | β |
geom_line() |
geom-line. |
β | β | X-sorted connection of observations. |
geom_path() |
geom-path. |
β | β | Connects rows in input order. |
geom_step() |
geom-step. |
β | β | Stair-step interpolation; direction is "hv" (default) or "vh". |
geom_col() |
geom-col. |
β | β | Honours position = "stack"/"dodge"/"fill". |
geom_bar() |
geom-bar. |
β | β | Wraps geom-col with stat = "count" and position = "stack". |
geom_histogram() |
geom-histogram. |
β | β | Uses stat-bin. |
geom_freqpoly() |
geom-freqpoly. |
β | β | Line through stat-bin midpoints; bins and binwidth mirror geom-histogram. |
geom_ribbon() |
geom-ribbon. |
β | β | β |
geom_area() |
geom-area. |
β | β | Filled polygon between y = 0 and y along x; pulls the y-domain to include zero. |
geom_smooth() |
geom-smooth. |
π‘ | β | method = "lm" only; "loess" deferred (needs LOWESS solver, not feasible without wasm). |
geom_boxplot() |
geom-boxplot. |
β | β | Default stat = "boxplot" runs the per-group five-number summary; raw observations in, full box+whiskers+outliers out. |
geom_violin() |
β | β¬ | β | Needs KDE; not feasible in pure Typst without wasm. |
geom_density() / geom_density_2d() / geom_density_2d_filled() |
β | β¬ | β | Needs KDE; not feasible in pure Typst without wasm. |
geom_dotplot() |
geom-dotplot. |
β | β | Bins observations along x via stat-bindot, stacks one dot per observation upward inside each bin. binwidth (or bins), dotsize, and stackratio follow ggplot2 semantics; method = "histodot" only (dynamic-binwidth dotdensity deferred). |
geom_jitter() |
geom-jitter. |
β | β | Point wrapper that defaults position to "jitter". |
geom_rug() |
geom-rug. |
β | β | Tick marks at observations on selected sides (b/t/l/r). |
geom_text() |
geom-text. |
β | β | Reads the label aesthetic. |
geom_label() |
geom-label. |
β | β | Boxed text with fill, stroke, radius. |
geom_rect() / geom_tile() |
geom-rect, geom-tile. |
β | β | geom_raster() (a ggplot2 fast path for regular grids) is not exposed; use geom-tile. |
geom_polygon() |
geom-polygon. |
β | β | One closed polygon per group; fill via fill or scale. |
geom_segment() |
geom-segment. |
β | β | Maps x/y/xend/yend. |
geom_curve() |
geom-curve. |
β | β | Quadratic-bezier curved variant of geom-segment. curvature (signed fraction of chord length) controls bow side and magnitude; angle shifts the apex along the chord. Sampled into n polyline points (default 32). |
geom_errorbar() |
geom-errorbar. |
β | β | Vertical range with horizontal end caps. |
geom_errorbarh() |
geom-errorbarh. |
β | β | Horizontal range with vertical caps; mirrors geom-errorbar over (y, xmin, xmax). |
geom_linerange() / geom_crossbar() / geom_pointrange() |
geom-linerange, geom-crossbar, geom-pointrange. |
β | β | linerange has no caps, crossbar is a filled box with a thick median bar, pointrange is a marker plus linerange. |
geom_abline() / geom_hline() / geom_vline() |
geom-abline, geom-hline, geom-vline. |
β | β | Scalar or array intercepts. Trans-aware: under log10/sqrt, abline samples 64 points so the line follows the warp. |
geom_blank() |
geom-blank. |
β | β | No-op draw; trains scales from its data. |
geom_function() |
geom-function. |
β | β | Samples a Typst callable across the x-domain into a polyline. |
geom_qq() / geom_qq_line() |
geom-qq, geom-qq-line. |
β | β | Reference distribution selectable via distribution: "normal" (default), "uniform", "exponential". Reference line through 25th and 75th sample quantiles. |
geom_quantile() |
geom-quantile. |
β | β | Linear quantile regression at user-supplied Ο via brute-force LP-breakpoint search through (xα΅’, xβ±Ό) pairs. Defaults to (0.25, 0.5, 0.75). O(nΒ³) β workable for plot-sized inputs. |
geom_count() |
geom-count. |
β | β | Wrapper over stat-sum; one point per unique (x, y) sized by count. |
geom_bin_2d() / geom_hex() |
geom-bin-2d, geom-hex. |
β | β | Rectangular and pointy-top hex bins. Default fill aesthetic is count. Both accept scalar or (x, y) bins / binwidth. |
geom_contour() / geom_contour_filled() |
geom-contour, geom-contour-filled. |
β | β | Marching-squares iso-lines and per-cell Sutherland-Hodgman iso-bands over a regular (x, y, z) grid. bins, binwidth, breaks control level placement; saddle cells use centre-average disambiguation. Filled bands tile per cell so default stroke: none keeps the shading seamless. |
geom_spoke() |
geom-spoke. |
β | β | Polar counterpart of geom-segment: each rowβs (angle, radius) gives the offset to the segment endpoint via xend = x + r * cos(angle). Reuses segment scaffolding for stroke, colour, alpha, linetype. |
geom_map() / geom_sf() / geom_sf_label() / geom_sf_text() |
β | β | β | Maps and sf are out of scope. |
Stats
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
stat_identity() |
stat-identity (implicit). |
β | β | β |
stat_count() |
stat-count. |
β | β | β |
stat_bin() |
stat-bin. |
β | β | β |
stat_smooth() |
stat-smooth. |
π‘ | β | OLS only; "loess" deferred (needs LOWESS solver, not feasible without wasm). |
stat_boxplot() |
stat-boxplot. |
β | β | Per-x bucketing with R type-7 quantiles; outliers retained for the geom. |
stat_summary() / stat_summary_bin() |
stat-summary, stat-summary-bin. |
β | β | Per-x bucket or per-bin reduction via mean-se / mean-cl-normal / mean-sdl / median-hilow. |
stat_ecdf() |
stat-ecdf. |
β | β | Empirical cumulative distribution: one row per unique x with y = count_le_x / n. |
stat_ellipse() |
stat-ellipse. |
β | β | Per-group covariance ellipse: 2Γ2 sample covariance, closed-form eigenvalues, axes scaled by sqrt(Ξ» Β· ΟΒ²(level, df=2)). Pair with geom-ellipse(stat: "ellipse"). |
stat_density() / stat_density_2d() / stat_density_2d_filled() / stat_ydensity() |
β | β¬ | β | Needs KDE; not feasible in pure Typst without wasm. |
stat_contour() / stat_contour_filled() |
stat-contour, stat-contour-filled. |
β | β | Reshapes long (x, y, z) rows into a regular grid. stat-contour emits iso-line segments grouped per level; stat-contour-filled emits one closed polygon per cell per band with level set to the bandβs lower bound (so a continuous fill scale shades by height). |
stat_bin_2d() / stat_bin_hex() / stat_summary_2d() / stat_summary_hex() |
stat-bin-2d, stat-bin-hex, stat-summary-2d, stat-summary-hex. |
β | β | stat-bin-* emit per-cell counts; rectangular cells also emit (xmin, xmax, ymin, ymax). stat-summary-* reduce a z aesthetic to value per cell (fun: accepts "mean", "median", "sum", "min", "max", or a callable). All accept scalar or (x, y) bins / binwidth. |
stat_qq() / stat_qq_line() |
stat-qq, stat-qq-line. |
β | β | Reference distribution selectable via distribution: "normal" (default), "uniform", "exponential". |
stat_quantile() |
stat-quantile. |
β | β | Backing statistic for @geom-quantile; emits sampled fitted-line rows tagged with quantile/group per Ο. |
stat_function() |
stat-function. |
β | β | Samples fun over x-limits; pairs with any geom that consumes (x, y) rows. |
stat_unique() |
stat-unique. |
β | β | Drops duplicate (x, y) rows; first occurrence wins. |
stat_manual() / stat_align() / stat_connect() |
stat-manual, stat-align, stat-connect. |
β | β | stat-manual runs a user closure on rows; stat-align resamples each group onto a shared x-grid (panel-level union + zero-crossings) for stacked area / ribbon; stat-connect inserts intermediate vertices between consecutive points (modes "hv" / "vh" / "mid" / "linear"). |
stat_sf() / stat_sf_coordinates() |
β | β | β | Out of scope. |
after_stat() / after_scale() / stage() / from_theme() |
after-stat, after-scale, stage, from-theme. |
β | β | from-theme resolves at _prepare-layer and pins into layer.params; after-stat accepts column-name strings and (row, ctx) closures; after-scale honoured on colour / fill / alpha / size / linewidth / stroke / shape / linetype; stage composes all three lanes. |
Position adjustments
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
position_identity() |
implicit default. | β | β | β |
position_stack() |
position-stack. |
β | β | Consumed by geom-col. |
position_dodge() |
position-dodge. |
β | β | Uniform and variable-per-row-width cases both supported; per-row width column packs side-by-side slots within each bucket and shrinks proportionally if the total exceeds the bucket. Subsumes the ggplot2 dodge2 case. |
position_dodge2() |
merged into position-dodge. |
β | β | Dropped from the surface; position-dodge covers both cases. |
position_fill() |
position-fill. |
β | β | Stack normalised to 1 per x bucket. |
position_jitter() |
position-jitter. |
β | β | Deterministic seed-based offsets; only continuous columns are jittered. |
position_nudge() |
position-nudge. |
β | β | Fixed (x, y) shift on every row. |
position_jitterdodge() |
position-jitterdodge. |
β | β | Groups dodge then jitter within their slot; pair with geom-jitter via position: position-jitterdodge(...). |
Annotations
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
annotate() |
annotate. |
β | β | Sugar over a one-row layer; supports text, point, label, segment, rect, vline, hline, abline. |
annotation_custom() / annotation_raster() |
β | β | β | Out of scope: geom-typst evaluates arbitrary Typst markup at a data position, covering both arbitrary content and image rasters natively. |
annotation_logticks() |
β | β | β | Out of scope: superseded by guide_axis_logticks (P3, Guides section). |
annotation_map() / borders() |
β | β | β | Maps out of scope. |
Aesthetics (names consumed by aes())
| ggplot2 | gribouille | Status | Priority | Notes |
|---|---|---|---|---|
x, y |
x, y. |
β | β | β |
xmin, xmax, ymin, ymax |
xmin, xmax, ymin, ymax. |
β | β | Exposed via aes() and trained like other positional aesthetics. |
xend, yend |
xend, yend. |
β | β | Folded into the x and y axis domains during scale training; consumed by @geom-segmentGitHub. |
colour, fill |
colour, fill. |
β | β | β |
alpha |
mapped via aes(alpha: ...). |
β | β | Per-row opacity applied through the colour/fill resolution chain in every drawing geom (point, line, path, step, area, ribbon, polygon, segment, rect, tile, errorbar/h, linerange, crossbar, pointrange, abline, hline, vline, rug, text, label, typst, ellipse, mark). |
size |
mapped via aes(size: ...). |
β | β | Per-row size resolution in geom-point (and wrappers geom-jitter/geom-count/geom-qq), geom-pointrange, geom-text, geom-label, geom-typst. Other geoms have no marker/text size to size and ignore the aesthetic. |
shape |
shape via scale-shape. |
β | β | Circle, square, triangle, diamond, cross, x, star, triangle-down palette; any other value renders as a literal glyph, so characters or emoji can serve as markers. |
linetype |
linetype via scale-linetype. |
β | β | Solid, dashed, dotted, dash-dotted, densely-dashed, loosely-dashed palette. |
linewidth |
mapped via aes(linewidth: ...). |
β | β | Per-row stroke thickness consumed by geom-line/path/step/segment/abline/hline/vline/errorbar/linerange/pointrange/rug. |
stroke |
mapped via aes(stroke: ...). |
β | β | Per-row marker outline thickness on geom-point. The layerβs stroke: parameter (length, dict, or auto) pins the value when set explicitly; auto (the default) routes through the stroke aesthetic. Paired with scale-stroke-continuous/-manual/-binned/-identity. |
group |
group. |
β | β | β |
weight |
mapped via aes(weight: ...). |
β | β | Per-row weights threaded into stat-count, stat-sum, stat-bin, stat-summary (mean/mean-se/mean-sd/mean-cl-normal helpers), stat-summary-bin, stat-ecdf, and stat-smooth (weighted least squares). Median and quantile-based reducers ignore weights for now. |
lower, middle, upper, ymin, ymax, outliers |
computed by stat-boxplot, consumed by geom-boxplot. |
β | β | Internal aesthetics carried between stat and geom. |
Inline type coercion (aes(colour = factor(x)), aes(x = as.numeric(g))) |
as-factor("col") / as-numeric("col") inside aes(). |
β | β | ggplot2 forces a mapping discrete or continuous at the aes() call site with factor() / as.numeric(). In gribouille, as-factor and as-numeric are dual-arity: called with (data, col) they rewrite the column across the whole plot, called with (col) from inside aes() they return a (kind: "mapping-ref", var: col, type: "discrete" \| "continuous") annotation that scopes the coercion to a single aesthetic. Scale training in src/scale/train.typ accepts either a plain string or the annotation dict via the mapping-ref-col / mapping-ref-type helpers, so the same numeric column can be continuous on x and discrete on colour in one plot. |
Positional scales
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
scale_x_continuous() / scale_y_continuous() |
scale-x-continuous, scale-y-continuous. |
β | β | β |
scale_x_discrete() / scale_y_discrete() |
scale-x-discrete, scale-y-discrete. |
β | β | β |
scale_x_log10() / scale_y_log10() |
scale-x-log10, scale-y-log10. |
β | β | Pre-stat: data is log-transformed before stats run, matching ggplot2 v4 / plotnine. Powers-of-10 break placement; sub-decade (2, 5) ticks emitted for narrow ranges. |
scale_x_sqrt() / scale_y_sqrt() |
scale-x-sqrt, scale-y-sqrt. |
β | β | Pre-stat warp; data is square-rooted before stats run. |
scale_x_reverse() / scale_y_reverse() |
scale-x-reverse, scale-y-reverse. |
β | β | Implemented by swapping the range endpoints during mapping. |
scale_x_binned() / scale_y_binned() |
scale-x-binned, scale-y-binned. |
β | β | Quantised continuous axis with ticks at bin midpoints. |
scale_x_date() / scale_y_date() / scale_x_datetime() / scale_y_datetime() / scale_x_time() / scale_y_time() |
scale-x-date, scale-y-date, scale-x-datetime, scale-y-datetime, scale-x-time, scale-y-time. |
β | β | Accepts ISO-8601 strings ("2024-01-15", "2024-01-15T08:30:00", "08:30") or numeric epoch input. Axis labels formatted via Typst datetime.display(date-format). Timezone offsets ignored. |
Colour and fill scales
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
scale_colour_continuous() / scale_fill_continuous() |
scale-colour-continuous, scale-fill-continuous. |
β | β | β |
scale_colour_discrete() / scale_fill_discrete() |
scale-colour-discrete, scale-fill-discrete. |
β | β | β |
scale_colour_manual() / scale_fill_manual() |
scale-colour-manual, scale-fill-manual. |
β | β | User-supplied palette array. |
scale_colour_viridis_c/d/b() / scale_fill_viridis_c/d/b() |
scale-colour-viridis-c/d/b, scale-fill-viridis-c/d/b. |
β | β | viridis, magma, plasma, inferno, cividis. |
scale_colour_brewer() / scale_fill_brewer() |
scale-colour-brewer, scale-fill-brewer. |
β | β | 24 ColorBrewer palettes (qualitative, sequential, diverging) via brewer-palette(name). |
scale_colour_gradient() / gradient2() / gradientn() |
scale-colour-gradient, scale-colour-gradient2, scale-colour-gradientn (and fill counterparts). |
β | β | Two-stop, diverging-around-midpoint, and n-stop gradients; legend colourbars match. |
scale_colour_steps() / steps2() / stepsn() |
scale-colour-steps, scale-colour-steps2, scale-colour-stepsn, plus fill counterparts. |
β | β | Binned variants of gradient/gradient2/gradientn. |
scale_colour_grey() / scale_fill_grey() |
scale-colour-grey, scale-fill-grey. |
β | β | Discrete grey ramp from start to end luminance. |
scale_colour_hue() / scale_fill_hue() |
scale-colour-hue, scale-fill-hue. |
β | β | OKLCh-spaced hues; near-equivalent to ggplot2βs HCL defaults. |
scale_colour_distiller() / fermenter() |
scale-colour-distiller, scale-colour-fermenter, plus fill counterparts. |
β | β | Continuous and binned Brewer; direction: -1 reverses. |
scale_colour_identity() / scale_fill_identity() |
scale-colour-identity, scale-fill-identity. |
β | β | Column values are passed through (hex strings or color values). No legend is drawn. |
Other aesthetic scales
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
scale_alpha() / *_continuous() / *_discrete() / *_manual() / *_binned() |
scale-alpha-continuous, scale-alpha-manual, scale-alpha-binned, scale-alpha-identity. |
β | β | Manual scale takes a per-level array of opacities; binned scale stays continuous with bin-snapped legend ticks. |
scale_size() / scale_size_manual() / scale_radius() |
scale-size-continuous, scale-size-manual, scale-radius. |
β | β | Manual scale takes a per-level array of Typst lengths; scale-radius is the linear value-to-radius alias. |
scale_size_area() / scale_size_binned_area() |
scale-size-area, scale-size-binned-area. |
β | β | resolve-size honours size-trans: "area" so radius scales with sqrt(value). |
scale_size_binned() |
scale-size-binned. |
β | β | Continuous mapping with bin-snapped legend ticks. |
scale_shape() / scale_shape_manual() / scale_shape_binned() |
scale-shape, scale-shape-manual, scale-shape-binned. |
β | β | _binned cuts a continuous variable into n-breaks bins, each bin gets one shape from the palette. |
scale_linetype() / scale_linetype_manual() / scale_linetype_binned() / scale_linetype_continuous() / scale_linetype_discrete() |
scale-linetype, scale-linetype-manual, scale-linetype-binned, scale-linetype-continuous, scale-linetype-discrete. |
β | β | _binned cuts a continuous variable into n-breaks bins; _continuous is an alias for _binned; _discrete is an alias for the default scale. |
scale_linewidth() / scale_linewidth_manual() / scale_linewidth_binned() |
scale-linewidth-continuous, scale-linewidth-manual, scale-linewidth-binned, scale-linewidth-identity. |
β | β | Manual scale takes a per-level array of Typst lengths; binned scale stays continuous with bin-snapped legend ticks. |
scale_shape_identity() / scale_linetype_identity() |
scale-shape-identity, scale-linetype-identity. |
β | β | Column values used as the shape / dash keyword directly. |
scale_size_identity() / scale_alpha_identity() / scale_linewidth_identity() |
scale-size-identity, scale-alpha-identity, scale-linewidth-identity. |
β | β | Column values used as the size / alpha / linewidth directly. |
Labels and limits
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
labels() |
labels(title:, subtitle:, caption:, x:, y:, colour:, fill:, ...). |
β | β | Axis names are injected into trained scale specs. Covers the role of xlab / ylab / ggtitle. |
get_labs() |
β | β | β | Out of scope. ggplot2 introspects a lazy plot object; gribouille has no equivalent β labels() is a plain dict the user already holds. |
lims() / x-limits() / y-limits() |
β | β | β | Use scale-x-continuous(limits:) / scale-y-continuous(limits:) directly. |
expansion() / expand_scale() |
per-scale expand: argument. |
β | β | Each positional scaleβs expand: accepts a ratio (5%) for proportional padding, a length (5pt) for canvas-space padding, a relative (5pt + 5%) for both, or a (lo, hi) 2-tuple for asymmetric padding. |
expand_limits() |
expand-limits. |
β | β | Folds extension values into the trained continuous domain rather than replacing it. |
Guides
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
Discrete guide_legend() for colour/fill |
automatic legend. | β | β | β |
guide_colourbar() |
automatic colourbar. | β | β | Emitted when trained colour/fill is continuous. |
guide_legend() customisation (nrow, ncolumn, reverse, β¦) |
guide-legend(title:, nrow:, ncolumn:, reverse:). |
β | β | Plot-level binding via guides(colour: guide-legend(...)). |
guide_coloursteps() |
automatic stepped colourbar. | β | β | Emitted automatically when a colour/fill scale carries binned: true (e.g., scale-colour-steps, scale-fill-fermenter, scale-colour-viridis-b): n-breaks discrete patches with ticks at the bin boundaries. |
guide_bins() |
automatic binned ladder. | β | β | Emitted automatically when a size/alpha/linewidth/stroke/shape/linetype scale carries binned: true: one glyph per bin at the midpoint. |
guide_axis() |
guide-axis(angle:, n-dodge:). |
β | β | Honours angle and n-dodge on both x- and y-axis (y-dodge staggers across columns receding from the axis). |
guide_axis_logticks() |
guide-axis-logticks(angle:, n-dodge:). |
β | β | Opt-in via guides(x: guide-axis-logticks()) (or y:). Adds half-length minor ticks at sub-decade positions (2, 3, β¦, 9) when paired with transform: "log10"; no-op on linear axes. Inherits angle/n-dodge from @guide-axis. |
guide_none() |
guides(<aes>: none). |
β | β | Suppress a specific aestheticβs legend, an x / y axisβs ticks and labels, or a radial theta / r axisβs labels, by passing none. |
guide_axis_stack() |
guide-axis-stack(guides:, spacing:). |
β | β | Stack multiple guide-axis / guide-axis-logticks rows on the same axis side; each sub-guide keeps its own angle/n-dodge. |
guide_axis_theta() |
guide-axis-theta(angle:, minor-ticks:, cap:). |
β | β | Bind via guides(theta: guide-axis-theta(...)) under coord-radial to rotate theta tick labels, emit half-step minor ticks, and draw an outer axis arc with optional "upper" / "lower" / "both" cap. |
guide_custom() |
guide-custom(content, width:, height:, title:). |
β | β | Free-form Typst content placed in the legend area; no associated scale. Right-side placement only in this slice; other positions are follow-up. |
guides() top-level |
guides. |
β | β | Threaded into plot(..., guides: guides(colour: guide-legend(...))). |
sec_axis() / dup_axis() |
sec-axis, dup-axis. |
β | β | Passed via secondary: on scale-x-continuous / scale-y-continuous. derive() deferred. |
draw_key_*() glyph family |
draw-key-point, draw-key-line, draw-key-rect, draw-key-path, draw-key-blank. |
β | β | Auto-dispatched by geom kind; legend swatches now match the layerβs visual. |
Facetting
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
facet_wrap() |
facet-wrap. |
β | β | scales = "fixed" (default), "free", "free_x", "free_y"; per-facet stats via partition-by-group. |
facet_grid() |
facet-grid(rows:, columns:). |
β | β | Strips on top (columns) and right (rows); shared scales only. |
vars() |
β | β | β | Out of scope. ggplot2βs vars() quotes faceting variables for facet_wrap()/facet_grid(); gribouilleβs facet-wrap("col") and facet-grid(rows: "col", columns: "col") take plain strings, so the wrapper is redundant. |
labeller() / label_value() / label_both() / label_context() / label_wrap_gen() |
labeller, label-value, label-both, label-context, label-wrap. |
β | β | Passed via labeller: on facet-wrap / facet-grid. label_parsed/label_bquote deferred. |
Coordinates
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
coord_cartesian() |
coord-cartesian. |
β | β | x-limits/y-limits override trained x/y domains (data is not dropped; out-of-range marks still render). |
coord_fixed() |
coord-fixed. |
β | β | Locks the aspect ratio so one x data unit equals ratio y data units. Honoured in non-faceted, facet-wrap (per-panel under free scales), and facet-grid renders. |
coord_flip() |
coord-flip. |
β | β | Swaps x and y at render time. Common geoms (point, line, col, bar, segment, abline/hline/vline) verified; less-common geoms inherit the swap and may need per-geom adjustment. |
coord_polar() / coord_radial() |
coord-radial. |
β | β | Pie, donut, rose, radar, radial scatter, paths, areas, ribbons, polygons, rect, tile, hex, ellipse, curve, spoke, dotplot, smooth, function, mark, typst, text/label, reference geoms (hline β circle, vline β ray, abline), errorbar / errorbarh / linerange / pointrange / crossbar / boxplot all render as polar wedges, spines and arc caps. geom-rug degrades to a no-op (axis-edge tassels donβt translate to polar). Replaces ggplot2βs legacy coord_polar(). |
coord_transform() |
coord-transform. |
β | β | Per-axis post-stat warp ("identity", "log10", "sqrt", "reverse"). Distinct from scale_x_log10() and friends, which are pre-stat. When both are set on the same axis, the scaleβs pre-stat warp wins. |
coord_map() / coord_quickmap() / coord_sf() |
β | β | β | Maps out of scope. |
Themes
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
theme_minimal() |
theme-minimal. |
β | β | β |
theme_classic() |
theme-classic. |
β | β | β |
theme_void() |
theme-void. |
β | β | β |
theme_grey() / theme_bw() / theme_linedraw() / theme_light() / theme_dark() |
theme-grey, theme-bw, theme-linedraw, theme-light, theme-dark. |
β | β | British spelling only: no theme-gray alias. |
theme() |
theme(..fields). |
β | β | Translates element_* dicts into flat keys consumed by merge-theme. |
element_blank() / element_rect() / element_line() / element_text() |
element-blank, element-rect, element-line, element-text. |
β | β | Plus element-typst() (gribouille extension that auto-evaluates Typst-markup strings on text surfaces). |
element_geom() |
element-geom(fill:, colour:, linewidth:, ink:, paper:, accent:). |
β | β | Layer-default record stored on theme.geom; honoured by every supporting geom with ggplot2 v4-style role inheritance (fill/colour are global overrides; ink/paper/accent shift the role colours each per-geom default falls back to). |
element_polygon() / element_point() |
β | β¬ | β | ggplot2 v4 ships these strictly as inheritance-tree parents in theme(polygon, point); no built-in plot component renders them. Gribouille has no extension-registration system, will revisit when one appears. |
margin() / margin_part() / margin_auto() |
margin. |
β | β | Per-side spacing record consumed by element-text / element-typst (text gaps) and element-rect (inset / outset offsets). Single margin() covers all three R helpers: every side defaults to auto (falls through to the consuming surfaceβs default), so margin() resets to defaults, margin(left: 2cm) overrides only the named side, and margin(top: 0pt, right: 0pt, bottom: 0pt, left: 0pt) pins every side. |
rel() |
β | β | β | Out of scope. Typst supports relative sizing natively via em (relative to text size) and % (relative to container), so a rel() wrapper is redundant. |
theme_get() / theme_set() |
theme-get, theme-set. |
β | β | Global theme state via Typstβs state() (layout-time). plot(theme: ...) always takes precedence over theme-set(). |
theme_update() / theme_replace() / %+replace% |
β | β | β | Out of scope. ggplot2βs update/replace mutate the global theme record; gribouille users compose themes by calling theme-set(theme(...)) with the merged record explicitly. |
theme_sub_axis*() / theme_sub_legend() / theme_sub_panel() / theme_sub_plot() / theme_sub_strip() |
theme-sub-axis, theme-sub-axis-x, theme-sub-axis-y, theme-sub-axis-bottom, theme-sub-axis-top, theme-sub-axis-left, theme-sub-axis-right, theme-sub-legend, theme-sub-panel, theme-sub-plot, theme-sub-strip. |
β | β | Shortcut groups expanding to family-prefixed theme(...) keys. |
Helpers
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
cut_interval() / cut_number() / cut_width() |
cut-interval, cut-number, cut-width. |
β | β | Pure helpers; bin labels of the form "(lo,hi]". |
resolution() |
resolution. |
β | β | Zero-aware by default; matches ggplot2. |
mean_se() / mean_cl_normal() / mean_sdl() / median_hilow() |
mean-se, mean-cl-normal, mean-sdl, median-hilow. |
β | β | mean-cl-normal panics on conf != 0.95. mean_cl_boot deferred. |
Programming and extension
| ggplot2 | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
ggproto() / ggproto_parent() |
β | β | β | S3/R6 pattern; Typst uses dict-of-functions instead. |
aes_() / aes_string() / aes_q() |
β | β | β | Deprecated upstream. |
print.ggplot / plot.ggplot |
β | β | β | Typst handles rendering. |
autoplot() / autolayer() / fortify() / map_data() / automatic_plotting |
β | β | β | R S3 dispatch. |
get_alt_text() |
get-alt-text. |
β | β | Reads spec.alt set via the new plot(..., alt: ...) parameter. |
Bundled datasets
| ggplot2 | gribouille | Status | Priority | Notes |
|---|---|---|---|---|
mpg, economics |
mpg (30 rows), economics (24 rows). |
β | β | Small subsets bundled for examples; values plausible but not exact. |
Other datasets (diamonds, economics_long, faithfuld, midwest, msleep, presidential, seals, txhousing, luv_colours) |
β | β | β | Bundling additional datasets bloats the package; users can load their own from CSV. The shipped trio (mpg, penguins, economics) covers the docs and tests. |
Extensions and native
Items outside the ggplot2 surface: ggforce ports and gribouille-native conveniences.
| Source | gribouille symbol | Status | Priority | Notes |
|---|---|---|---|---|
ggforce::geom_ellipse() |
geom-ellipse. |
β | β | Standalone ellipse from (x0, y0, a, b, angle) parameters; samples 64 vertices per row and renders through the polygon draw path. Axes auto-extend to enclose every ellipse. |
ggforce::geom_mark_*() family |
geom-mark. |
β | β | Unified annotation geom with method: "circle" / "ellipse" / "hull" / "rect" covering _circle/_ellipse/_hull/_rect. method avoids clash with shape aesthetic. Hull uses Andrewβs monotone chain; circle is smallest enclosing; ellipse is bbox-aligned. |
| native (no upstream) | geom-typst. |
β | β | Sibling of geom-text that always evaluates the label aesthetic as Typst markup. Both routings work: annotate("typst", label: "...") and annotate("text", label: typst("...")) (the typst() tag survives annotateβs per-row dataset by being preserved on the mapping column reference). |
Coverage at a glance
- Plot basics:
plot()andaes()coveringx,y,colour,fill,size,alpha,group. - Geoms:
point,line,path,step,col,bar,histogram,freqpoly,ribbon,area,boxplot,dotplot,jitter,rug,text,label,typst,rect,tile,bin-2d,hex,contour,contour-filled,polygon,segment,curve,spoke,ellipse,mark,errorbar,errorbarh,linerange,crossbar,pointrange,abline,hline,vline,blank,function,qq,qq-line,quantile,count;geom-smoothcoversmethod = "lm"only. - Stats:
stat-identity,stat-count,stat-sum,stat-bin,stat-bin-2d,stat-bin-hex,stat-bindot,stat-boxplot,stat-contour,stat-contour-filled,stat-summary,stat-summary-bin,stat-summary-2d,stat-summary-hex,stat-ecdf,stat-ellipse,stat-qq,stat-qq-line,stat-quantile,stat-unique,stat-function,stat-manual,stat-align,stat-connect;stat-smoothcoversmethod = "lm"only. - Positions:
identity,stack,fill,dodge(uniform and variable widths),jitter,jitterdodge,nudge. - Annotations:
annotate()withtext,point,label,segment,rect,vline,hline,abline. - Positional scales: continuous, discrete, log10, sqrt, reverse, date, datetime, time, on x and y.
- Colour and fill scales: continuous, discrete, manual, viridis (c/d/b), brewer, gradient, gradient2, gradientn, grey, hue, distiller, identity.
- Other aesthetic scales: shape and linetype (with manual and identity variants); linewidth, alpha, and size (continuous, manual, binned, identity); size also has
scale-size-area,scale-size-binned-area, and thescale-radiuslinear alias. - Coords:
coord-cartesian(with x-limits/y-limits),coord-fixed,coord-flip,coord-radial(pie/donut/rose/radar), andcoord-transform(post-stat per-axis warp). - Facets:
facet-wrap(fixed/free/free_x/free_yscales) andfacet-grid(shared scales only). - Themes:
theme-minimal,theme-classic,theme-void,theme-grey,theme-bw,theme-linedraw,theme-light,theme-dark,theme-test, plustheme()withelement-blank,element-rect,element-line,element-text, andelement-geomdriving every supporting geomβs defaultfill/colour/linewidthwith ggplot2 v4-style role inheritance throughink/paper/accent. Family-scoped shortcut groups:theme-sub-axis(and per-axis / per-side variants),theme-sub-legend,theme-sub-panel,theme-sub-plot,theme-sub-strip. - Guides:
guide-legendwithtitle/nrow/ncol/reverse, automaticguide-colourbarfor continuous colour and fill,guide-axis(x and y) withguide-axis-logticksfor log10 minor ticks,guide-axis-stackto stack multiple axis-guide rows on one side,guide-axis-thetafor radial theta tick labels and outer axis arc,guide-customfor free-form Typst content in the legend area, a top-levelguides()binder, andnoneto suppress a specific aestheticβs legend. - Helpers:
cut-interval,cut-number,cut-width,resolution,mean-se,mean-cl-normal,mean-sdl,median-hilow. - Datasets:
mpg(30 rows) andeconomics(24 rows).
How this page is updated
Every implementation slice flips the Status column for every row it touches in the same commit as the code.