← Back to all sparks
G

ggdist

INFRA · APIS
Velocity0.0

Visualizations of Distributions and Uncertainty

The grammar of uncertainty visualization, now drawing the uncertainty in its own estimates.

data-visualizationuncertaintybayesian-statisticsggplot2density-estimationr-package
Current state
ggdist supplies ggplot2 with a compositional vocabulary for distributions — slabs, intervals, dotplots and the sub-geometries that combine them. The last three years moved it from a drawing library to an estimation library: bounded density estimation with Sheather-Jones bandwidth became the default, weights propagate through every density, interval and point summary, and blurred dotplots render Monte Carlo standard error as visual fuzz. The 2025 release rounds this out with per-geometry thickness subscales and settable global defaults.
Where it's heading
Two threads run in parallel and keep converging. One is statistical: pluggable density estimators arrived first, then became the default, then gained weights and quantile histograms. The other is compositional: sub-geometries acquired their own guides, then their own scales, so a slab's thickness axis is now a first-class annotated dimension. Cadence has stretched from twice-yearly to roughly annual, with the recent work tightening existing surface rather than opening new.
Prediction
Subguides gained subscales a release later, so the remaining asymmetry is in the sub-geometry system rather than the statistics; expect the next release to continue that fill-in work.

Recent moves

  1. 1y ago

    Per-geometry thickness subscales and settable defaults

    Subscales complete the sub-geometry system started by subguides: thickness limits and expansion can now be adjusted per geometry, and defaults for subscales and subguides can be set globally. Bin edge openness, square blur-dot shapes and nested-interval width helpers round it out, plus valid data types annotated across nearly all parameter documentation.

    View source ↗
  2. 2y ago

    Blurred dotplots draw Monte Carlo error; weights reach every estimator

    ⚡ SPARK

    geom_blur_dots() gives each dot its own standard deviation, and stat_mcse_dots() uses it to show quantiles alongside their own Monte Carlo error — uncertainty about uncertainty, rendered as blur. In the same release the weight aesthetic propagates through densities, CDFs, every interval type and every point summary, and sub-geometries gain axis annotations via subguides.

    View source ↗
  3. 2y ago

    C++ dotplot binning and safer bandwidth fallbacks

    Wilkinson dotplot binning moves to C++, which mainly shows on large dotplots, and failing bandwidth estimators now fall back to nrd0 with a warning suggesting a dotplot or histogram instead. A bar layout and a batch of ggplot2 forward-compatibility fixes complete the release.

    View source ↗
  4. 3y ago

    Bounded density becomes the default; existing charts change

    ⚡ SPARK

    The default density estimator switches to density_bounded() with Sheather-Jones bandwidth, which the maintainer warns will alter existing plots — accepted as the cost of accurate estimation on bounded data. Histograms are rebuilt on a density_histogram() estimator with fine-grained break and alignment control, and geom_spike() adds annotations to slabs.

    View source ↗
  5. 3y ago

    Categorical distributions, hex layouts, pluggable density estimators

    Slab and dots stats accept non-numeric distributions including categorical and Bernoulli, dotplot layout gains hexagonal packing, smoothing modes and constrained-optimization nudging, and geom_swarm() and geom_weave() arrive as shortcuts. The density argument opens the estimator up to custom implementations — the plug point the next release would use to change the default.

    View source ↗
  6. 4y ago

    Computed variables shared across sub-geometries

    Interval width and level become usable inside slab and dots sub-geometries, so densities can be filled by interval without cut_cdf_qi() and, unlike that approach, this works on highest-density intervals. scale_thickness_shared() lets thickness be compared across geometries — a prerequisite for plotting prior and posterior together.

    View source ↗