ggdist: Visualizations of Distributions and Uncertainty in the Grammar of Graphics
Matthew Kay
Abstract
The grammar of graphics is ubiquitous, providing the foundation for a variety of popular visualization tools and toolkits. Yet support for uncertainty visualization in the grammar graphics-beyond simple variations of error bars, uncertainty bands, and density plots-remains rudimentary. Research in uncertainty visualization has developed a rich variety of improved uncertainty visualizations, most of which are difficult to create in existing grammar of graphics implementations. ggdist, an extension to the popular ggplot2 grammar of graphics toolkit, is an attempt to rectify this situation. ggdist unifies a variety of uncertainty visualization types through the lens of distributional visualization, allowing functions of distributions to be mapped to directly to visual channels (aesthetics), making it straightforward to express a variety of (sometimes weird!) uncertainty visualization types. This distributional lens also offers a way to unify Bayesian and frequentist uncertainty visualization by formalizing the latter with the help of confidence distributions. In this paper, I offer a description of this uncertainty visualization paradigm and lessons learned from its development and adoption: ggdist has existed in some form for about six years (originally as part of the tidybayes R package for post-processing Bayesian models), and it has evolved substantially over that time, with several rewrites and API re-organizations as it changed in response to user feedback and expanded to cover increasing varieties of uncertainty visualization types. Ultimately, given the huge expressive power of the grammar of graphics and the popularity of tools built on it, I hope a catalog of my experience with ggdist will provide a catalyst for further improvements to formalizations and implementations of uncertainty visualization in grammar of graphics ecosystems. A free copy of this paper is available at https://osf.io/2gsz6. All supplemental materials are available at https://github.com/mjskay/ggdist-paper and are archived on Zenodo at doi:10.5281/zenodo.7770984.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 37fdf9c0-7b64-4094-94e5-6e255c96290dCited by top-tier papers6
- Unveiling High-dimensional Backstage: A Survey for Reliable Visual Analytics with Dimensionality ReductionHyeon Jeon, Hyunwook Lee, Yun-Hsin Kuo, Taehyun Yang et al.CHI 2025 · 29 citations
- The Backstory to "Swaying the Public": A Design Chronicle of Election Forecast VisualizationsFumeng Yang, Mandi Cai, Chloe Mortenson, Hoda Fakhari et al.IEEE VIS 2024 · 5 citations
- Defogger: A Visual Analysis Approach for Data Exploration of Sensitive Data Protected by Differential PrivacyXumeng Wang, Shuangcheng Jiao, Chris BryanIEEE VIS 2024 · 3 citations
- VMC: A Grammar for Visualizing Statistical Model ChecksZiyang Guo, Alex Kale, Matthew Kay, Jessica HullmanIEEE VIS 2024 · 1 citation
- Designing for Disclosure in Data VisualizationsKrisha Mehta, Gordon Kindlmann, Alex KaleIEEE VIS 2025 · 1 citation
Related papers
- A Probabilistic Grammar of GraphicsXiaoying Pu, Matthew KayCHI 2020 · 31 citations
- How Data Analysts Use a Visualization Grammar in PracticeXiaoying Pu, Matthew KayCHI 2023 · 10 citations
- GoFish: A Grammar of More Graphics!Josh Pollock, Arvind SatyanarayanIEEE VIS 2025 · 2 citations
- Bayesian-Assisted Inference from Visualized DataYea-Seul Kim, Paula Kayongo, Madeleine Grunde-McLaughlin, Jessica HullmanIEEE VIS 2020 · 40 citations
- Visual Reasoning Strategies for Effect Size Judgments and DecisionsAlex Kale, Matthew Kay, Jessica HullmanIEEE VIS 2020 · 112 citations
