ggdist: Visualizations of Distributions and Uncertainty in the Grammar of Graphics
Open accessThe DOI matches its Crossref record; 53 of the 53 references it cites were found in a registry or an index.
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.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
R: A Language and Environment for Statistical Computing
R Core Team (2025) · doi:10.32614/r.manuals · Cited by 352,181
brms : An R Package for Bayesian Multilevel Models Using Stan
Bürkner, P.-C. (2017) · Journal of Statistical Software · doi:10.18637/jss.v080.i01 · Cited by 9,476 · cited 1×
“…on my past mistakes, a better name would be mass . modeling package, and preds is a data frame of weight values to predict on, we can add a column to preds that contains a random variable representation of p ( mpg | weight ) using brms::posterior_predict [8] and the posterior::rvar data type [7].”
MethodWickham, H. (2011) · WIREs Computational Statistics · doi:10.1002/wics.147 · Cited by 4,304
Bostock, M., Ogievetsky, V., & Heer, J. (2011) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2011.185 · Cited by 3,165 · cited 1×
“While there are examples of wildly successful systems that came out of visualization research (e.g. d3 [5], Vega-lite [44]), few systems have both the generality and reach of those exemplars.”
BackgroundWickham, H. (2014) · Journal of Statistical Software · doi:10.18637/jss.v059.i10 · Cited by 901
Vega-Lite: A Grammar of Interactive Graphics
Satyanarayan, A., Moritz, D., Wongsuphasawat, K., & Heer, J. (2017) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2016.2599030 · Cited by 883 · cited 2×
“While there are examples of wildly successful systems that came out of visualization research (e.g. d3 [5], Vega-lite [44]), few systems have both the generality and reach of those exemplars.”
BackgroundMethodA Nested Model for Visualization Design and Validation
Munzner, T. (2009) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2009.111 · Cited by 880 · cited 2×
“36 As a result, we can visualize a log-transformed log-Normal density and get the correct result: This emphasizes the need for uncertainty visualization systems to be scale-aware : it is not possible to comprehensively implement uncertainty visualization purely as a data pre-processing step.”
BackgroundWilkinson, L. (2005) · Springer eBooks · doi:10.1007/0-387-28695-0 · Cited by 836
The Relational Model for Database Management: Version 2
Codd, E. F. (1990) · CERN Document Server (European Organization for Nuclear Research) · Cited by 808
Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems
(2023) · doi:10.1145/3544548 · Cited by 735
Rejecting or Accepting Parameter Values in Bayesian Estimation
Kruschke, J. K. (2018) · Advances in Methods and Practices in Psychological Science · doi:10.1177/2515245918771304 · Cited by 734 · cited 1×
“A common procedure in Bayesian estimation is to use regions of practical equivalence ( ROPE s) [32].”
MethodComputing and Graphing Highest Density Regions
Hyndman, R. J. (1996) · The American Statistician · doi:10.1080/00031305.1996.10474359 · Cited by 720 · cited 1×
“This also limits us specifically to quantile intervals, when other intervals types, such as highest-density intervals [24] or shortest intervals [34], might be preferable.”
BackgroundThe Comprehensive R Archive Network
Hornik, K. (2012) · WIREs Computational Statistics · doi:10.1002/wics.1212 · Cited by 643 · cited 1×
“Recognizing this broader need, in 2020 I spun off the uncertainty visualization components of tidybayes into a new package, ggdist , and published it to CRAN [21].”
BackgroundDesign Features of Graphs in Health Risk Communication: A Systematic Review
Ancker, J. S., Senathirajah, Y., Kukafka, R., & Starren, J. B. (2006) · Journal of the American Medical Informatics Association · doi:10.1197/jamia.m2115 · Cited by 548
Raincloud plots: a multi-platform tool for robust data visualization
Allen, M., Poggiali, D., Whitaker, K., Marshall, T. R., van Langen, J., & Kievit, R. A. (2021) · Wellcome Open Research · doi:10.12688/wellcomeopenres.15191.2 · Cited by 498 · cited 1×
“Myriad combinations of these are possible, leading to charts like (D) logit dotplots and (E) raincloud plots [1].”
BackgroundSun, Y., & Genton, M. G. (2011) · Journal of Computational and Graphical Statistics · doi:10.1198/jcgs.2011.09224 · Cited by 459 · cited 1×
“…(although lineribbon supports some multivariate chart types: besides being able to visualize many conditional distributions at once as ribbons, when used with the curve_interval function lineribbon s can visualize joint uncertainty bands in the style of functional boxplots [26, 35, 46]).”
BackgroundWickham, H. (2010) · Journal of Computational and Graphical Statistics · doi:10.1198/jcgs.2009.07098 · Cited by 389 · cited 2×
“Popular implementations like ggplot2 [48,49] and Vega-lite [44] typically provide versions of error bars (for points), uncertainty bands (for lines), boxplots, and density plots.”
BackgroundMethodConfidence Distribution, the Frequentist Distribution Estimator of a Parameter: A Review
Xie, M., & Singh, K. (2013) · International Statistical Review · doi:10.1111/insr.12000 · Cited by 319 · cited 2×
“A crucial insight—that frequentist uncertainty visualization can be brought into that same framework under the remit of confidence distributions [55]—frees us from multiple tyrannies: (1) endless battles about whether one should be a frequentist or Bayesian when you just want to get on with…”
Backgroundtidybayes: Tidy Data and Geoms for Bayesian Models
Kay, M. (2018) · Figshare · doi:10.5281/zenodo.1308151 · Cited by 275
Self-citationError Bars Considered Harmful: Exploring Alternate Encodings for Mean and Error
Correll, M., & Gleicher, M. (2014) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2014.2346298 · Cited by 258 · cited 2×
“Back in 2014, the inimitable Michaels Correll and Gleicher—arguing that error bars should be considered harmful [11]— proposed instead a visualization which has a solid bar inside the 95% interval and gradient tails that fade out beyond the interval, to emphasize the arbitrariness of the 95%…”
BackgroundKay, M., Kola, T., Hullman, J. R., & Munson, S. A. (2016) · Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems · doi:10.1145/2858036.2858558 · Cited by 239 · cited 3×
“These days, when every other uncertainty visualization paper is about frequency framing or discrete outcome displays—spaghetti plots [12, 33] hypothetical outcome plots [22, 27], quantile dotplots [14, 31] and so on—”
BackgroundMethodSelf-citationBuilding Multiple Regression Models Interactively
Henderson, H. V., & Velleman, P. F. (1981) · Biometrics · doi:10.2307/2530428 · Cited by 220 · cited 1×
“We create a scatterplot of the infamous mtcars dataset [19], for example, by mapping one variable onto the x aesthetic and another onto the y aesthetic: This notation sets up two aesthetic mappings : 4 a mapping from the weight variable onto the x aesthetic, and a mapping from the mpg variable onto…”
MethodHullman, J., Resnick, P., & Adar, E. (2015) · PLOS ONE · doi:10.1371/journal.pone.0142444 · Cited by 194 · cited 2×
“These days, when every other uncertainty visualization paper is about frequency framing or discrete outcome displays—spaghetti plots [12, 33] hypothetical outcome plots [22, 27], quantile dotplots [14, 31] and so on—”
BackgroundMethodUncertainty Displays Using Quantile Dotplots or CDFs Improve Transit Decision-Making
Fernandes, M., Walls, L., Munson, S., Hullman, J., & Kay, M. (2018) · Proceedings of the 2018 CHI Conference on Human Factors in Computing Systems · doi:10.1145/3173574.3173718 · Cited by 175 · cited 2×
“These days, when every other uncertainty visualization paper is about frequency framing or discrete outcome displays—spaghetti plots [12, 33] hypothetical outcome plots [22, 27], quantile dotplots [14, 31] and so on—”
BackgroundSelf-citationCurve Boxplot: Generalization of Boxplot for Ensembles of Curves
Mirzargar, M., Whitaker, R. T., & Kirby, R. M. (2014) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2014.2346455 · Cited by 174 · cited 2×
“…(although lineribbon supports some multivariate chart types: besides being able to visualize many conditional distributions at once as ribbons, when used with the curve_interval function lineribbon s can visualize joint uncertainty bands in the style of functional boxplots [26, 35, 46]).”
BackgroundISOTYPE Visualization: Working Memory, Performance, and Engagement with Pictographs
Haroz, S., Kosara, R., & Franconeri, S. L. (2015) · Proceedings of the 33rd Annual ACM Conference on Human Factors in Computing Systems · doi:10.1145/2702123.2702275 · Cited by 160 · cited 1×
“…shape as: In ggplot2 this is: scale_shape_manual(values = c("TRUE" = " ", "FALSE" = " ")) This may seem manifestly silly, but there’s something to the idea of making discrete outcomes more concrete—or at least more memorable— through graphic depictions, whether it be with emoji or other icons [17].”
Backgroundggdist: Visualizations of Distributions and Uncertainty
Kay, M. (2020) · doi:10.32614/cran.package.ggdist · Cited by 147
Self-citationHypothetical Outcome Plots Help Untrained Observers Judge Trends in Ambiguous Data
Kale, A., Nguyen, F., Kay, M., & Hullman, J. (2019) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2018.2864909 · Cited by 122 · cited 2×
“These days, when every other uncertainty visualization paper is about frequency framing or discrete outcome displays—spaghetti plots [12, 33] hypothetical outcome plots [22, 27], quantile dotplots [14, 31] and so on—”
BackgroundMethodSelf-citationVISUALIZING UNCERTAINTY IN PREDICTED HURRICANE TRACKS
Cox, J., House, D. H., & Lindell, M. K. (2012) · International Journal for Uncertainty Quantification · doi:10.1615/int.j.uncertaintyquantification.2012003966 · Cited by 107 · cited 2×
“These days, when every other uncertainty visualization paper is about frequency framing or discrete outcome displays—spaghetti plots [12, 33] hypothetical outcome plots [22, 27], quantile dotplots [14, 31] and so on—”
BackgroundBar graphs depicting averages are perceptually misinterpreted: The within-the-bar bias
Newman, G. E., & Scholl, B. J. (2012) · Psychonomic Bulletin & Review · doi:10.3758/s13423-012-0247-5 · Cited by 101 · cited 1×
“23 I don’t know if this is an example of within-the-bar bias [38] or not.”
BackgroundWilkinson, L. (1999) · The American Statistician · doi:10.1080/00031305.1999.10474474 · Cited by 101
tidybayes: Tidy Data and 'Geoms' for Bayesian Models
Kay, M. (2018) · doi:10.32614/cran.package.tidybayes · Cited by 98
Self-citationCritical Reflections on Visualization Authoring Systems
Satyanarayan, A., Lee, B., Ren, D., Heer, J., Stasko, J., Thompson, J., Brehmer, M., & Liu, Z. (2019) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2019.2934281 · Cited by 96 · cited 1×
“Ultimately, in the spirit of recent retrospectives on visualization system design [43], I hope to distill down some of what I’ve learned developing a moderately-well-used uncertainty visualization toolkit.”
BackgroundLiu, L., Padilla, L., Creem-Regehr, S. H., & House, D. H. (2018) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2018.2865193 · Cited by 96 · cited 2×
“These days, when every other uncertainty visualization paper is about frequency framing or discrete outcome displays—spaghetti plots [12, 33] hypothetical outcome plots [22, 27], quantile dotplots [14, 31] and so on—”
BackgroundHuron, S., Vuillemot, R., & Fekete, J. (2013) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2013.227 · Cited by 94 · cited 1×
“…like the idea of generative stories in uncertainty visualization; e.g., I’ve used Plinko boards to depict uncertainty in election forecasts, which try to capitalize on a physical process—one that might intuitively 24 feel random to people—to depict uncertainty through a form of sedimentation [23].”
BackgroundSurgical Audit: Statistical Lessons from Nightingale and Codman
Spiegelhalter, D. J. (1999) · Journal of the Royal Statistical Society Series A: Statistics in Society · doi:10.1111/1467-985x.00120 · Cited by 92 · cited 1×
“Examples include, but are not limited to, quantile dotplots [14, 31], gradient error bars [11], gradient plots [6,25], fan charts [25], and innumerable variations on eye plots [4, 18, 31, 45].”
BackgroundWickham, H. (2019) · Chapman & Hall/CRC eBooks · doi:10.1201/9781351201315 · Cited by 87
Displaying Uncertainty With Shading
Jackson, C. H. (2008) · The American Statistician · doi:10.1198/000313008x370843 · Cited by 82 · cited 3×
“The obvious first example would be a color gradient plot [25], by mapping density onto alpha : 15 Grammar of graphics aficionados might ask: why not use faceting instead of creating a new positional subscale?”
BackgroundMethodAmrhein, V., & Greenland, S. (2022) · Journal of Information Technology · doi:10.1177/02683962221105904 · Cited by 56 · cited 1×
“Importantly, the function I’ve used to construct the tails is not arbitrary; it is meaningful in itself: 1 − | 2 F M ( x ) − 1 | is the consonance curve [2], which (in the frequentist interpretation) is the two-sided p -value for the null hypothesis M = x .”
Methodposterior: Tools for Working with Posterior Distributions
Bürkner, P., Gabry, J., Kay, M., & Vehtari, A. (2021) · doi:10.32614/cran.package.posterior · Cited by 56
Self-citationWickham, H., & Hofmann, H. (2011) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2011.227 · Cited by 55 · cited 1×
“PGOG focused mainly on product plots [52], icon arrays [3], and dotplots [53], while ggdist expands the expressiveness of a distributional visualization syntax to cover visualization types that are not just functions of density and mass functions, but also functions of CDF s and intervals.”
BackgroundnumDeriv: Accurate Numerical Derivatives
Varadhan, P. G. A. R. (2006) · doi:10.32614/cran.package.numderiv · Cited by 54
Perceptual Components of Computer Displays
Haber, & Wilkinson (1982) · IEEE Computer Graphics and Applications · doi:10.1109/mcg.1982.1674217 · Cited by 42 · cited 1×
“Another interesting 2021 uncertainty visualization is Haber and Wilkinson’s [16] fuzzygram , i.e. fuzzy histogram .”
BackgroundRaindrop Plots: A New Way to Display Collections of Likelihoods and Distributions
Barrowman, N. J., & Myers, R. A. (2003) · The American Statistician · doi:10.1198/0003130032369 · Cited by 40
Helske, J., Helske, S., Cooper, M., Ynnerman, A., & Besancon, L. (2021) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2021.3073466 · Cited by 38 · cited 4×
“…also adjust the tails to fade outside the 85% interval, since otherwise the fading is hard to see in the skinny tails of the violin: Okay fine, but let’s get even weirder : Helske et al [18] further suggested using discrete intervals for the colors instead of a gradient, to aid discriminability.”
BackgroundMethodInfluentialrlang: Functions for Base Types and Core R and 'Tidyverse' Features
Henry, L., & Wickham, H. (2017) · doi:10.32614/cran.package.rlang · Cited by 36
A Probabilistic Grammar of Graphics
Pu, X., & Kay, M. (2020) · CHI Conference on Human Factors in Computing Systems · doi:10.1145/3313831.3376466 · Cited by 36 · cited 1×
“…a variety of uncertainty visualization types was inspired by my work with Xiaoying Pu developing a Probabilistic Grammar of Graphics ( PGOG ) [40], which tackled the problem of specifying area and unit visualizations of conditional probability distributions by integrating probability…”
MethodSelf-citationSimulation-efficient shortest probability intervals
Liu, Y., Gelman, A., & Zheng, T. (2015) · Statistics and Computing · doi:10.1007/s11222-015-9563-8 · Cited by 35 · cited 1×
“This also limits us specifically to quantile intervals, when other intervals types, such as highest-density intervals [24] or shortest intervals [34], might be preferable.”
BackgroundFixed-time descriptive statistics underestimate extremes of epidemic curve ensembles
Juul, J. L., Græsbøll, K., Christiansen, L. E., & Lehmann, S. (2020) · Nature Physics · doi:10.1038/s41567-020-01121-y · Cited by 29 · cited 1×
“…(although lineribbon supports some multivariate chart types: besides being able to visualize many conditional distributions at once as ribbons, when used with the curve_interval function lineribbon s can visualize joint uncertainty bands in the style of functional boxplots [26, 35, 46]).”
Backgroundcranlogs: Download Logs from the 'RStudio' 'CRAN' Mirror
Csárdi, G. (2015) · doi:10.32614/cran.package.cranlogs · Cited by 18
How Data Analysts Use a Visualization Grammar in Practice
Pu, X., & Kay, M. (2023) · CHI Conference on Human Factors in Computing Systems · doi:10.1145/3544548.3580837 · Cited by 18 · cited 2×
“37 This is one example of what Xiaoying Pu and I termed a tight coupling in a study of ggplot2 users [41]: data pre-processing (calculating the density) is tightly coupled with the visualization specification (the scale transformation), and these must be kept in sync.”
BackgroundSelf-citationBOWMAN, A. W. (2019) · Journal of the Royal Statistical Society Series A (Statistics in Society) · doi:10.1111/rssa.12379 · Cited by 14 · cited 2×
“Once we have a multiple-ribbon geometry, it is easy to create other visualization types, like gradient fan charts [6, 25].”
BackgroundMethod(2014) · Institutional Repository University of Antioquia (University of Antioquia) · doi:10.1371/journal.pone
Research works printed but not linked: 6
- 10.12688/wellcomeopenres.15191.1 · doi:10.12688/wellcomeopenres.15191.1 · Paper page
- Cairo, 2018, Our font is made of people, OpenNews - Source
- Kay, 2018, Unifying names of output columns in bayesplot / tidybayes / etc, The Stan Forums
- Murrell, 2022, Vectorised pattern fills in R graphics
- OHara-Wild, 2022, distributional: Vectorised probability distributions, R package version 0.3.1
- 2020, Dot prefix, Tidyverse Design Guide
Cited by
Sadick, J. S., O’Dea, M. R., Hasel, P., Dykstra, T., Faustin, A., & Liddelow, S. A. (2022) · Neuron · doi:10.1016/j.neuron.2022.03.008 · Cited by 415
Morris, D. H., Yinda, K. C., Gamble, A., Rossine, F. W., Huang, Q., Bushmaker, T., Fischer, R. J., Matson, M. J., Van Doremalen, N., Vikesland, P. J., et al. (2021) · eLife · doi:10.7554/elife.65902 · Cited by 254
Metadata
- Authors
- Kay, M.
- Venue
- IEEE Transactions on Visualization and Computer Graphics
- Published
- 2023
- Volume
- 30
- Issue
- 1
- Pages
- 1-11
- ISSN
- 1077-2626 (ISSN-L)
- 1941-0506
- 2160-9306
- OpenAlex
- W4387965650
- Cited by
- 174
- References
- 53
- FWCI
- 14.73
- Type
- journal article
- Language
- en
- Open access
- gold
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.