Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Jan 21:4:63.
doi: 10.12688/wellcomeopenres.15191.2. eCollection 2019.

Raincloud plots: a multi-platform tool for robust data visualization

Affiliations

Raincloud plots: a multi-platform tool for robust data visualization

Micah Allen et al. Wellcome Open Res. .

Abstract

Across scientific disciplines, there is a rapidly growing recognition of the need for more statistically robust, transparent approaches to data visualization. Complementary to this, many scientists have called for plotting tools that accurately and transparently convey key aspects of statistical effects and raw data with minimal distortion. Previously common approaches, such as plotting conditional mean or median barplots together with error-bars have been criticized for distorting effect size, hiding underlying patterns in the raw data, and obscuring the assumptions upon which the most commonly used statistical tests are based. Here we describe a data visualization approach which overcomes these issues, providing maximal statistical information while preserving the desired 'inference at a glance' nature of barplots and other similar visualization devices. These "raincloud plots" can visualize raw data, probability density, and key summary statistics such as median, mean, and relevant confidence intervals in an appealing and flexible format with minimal redundancy. In this tutorial paper, we provide basic demonstrations of the strength of raincloud plots and similar approaches, outline potential modifications for their optimal use, and provide open-source code for their streamlined implementation in R, Python and Matlab ( https://github.com/RainCloudPlots/RainCloudPlots). Readers can investigate the R and Python tutorials interactively in the browser using Binder by Project Jupyter.

Keywords: Matlab; Python; R; barplots; data visualization; raincloud plots.

PubMed Disclaimer

Conflict of interest statement

No competing interests were disclosed.

Figures

Figure 1.
Figure 1.. The trouble with barplots.
Example reproduced from “Boxplots vs. Barplots” ( 2016) two simulated datasets with mean = 50, sd = 25, and 1000 observations. A) a barplot and errorbars representing +/- standard error of the mean gives the impression that the measure is equivalent between the two groups. In fact, group 1 is drawn from an exponential distribution as seen in B) boxplots, and C) histograms. The barplot not only obscures the underlying nature of the observations, but also hides the fact that these data are not appropriate for standard parametric inference. See figure1.Rmd for code to generate these figures.
Figure 2.
Figure 2.. Extant approaches to improved data plotting.
A) The simplest improvement is to add jittered raw data points to the standard boxplot and +/- standard error scheme. B) Alternatively, dotplots can be used to supplement visualizations of central tendency and error, at the risk of added complexity due to the dependence of such plots on choices such as bin-width and dot size. C) A popular recent alternative is the violin plot coupled with boxplots or similar. However, this needlessly mirrors information about the redundant data axis (here, the x-axis). See figure2.Rmd for code to generate these figures.
Figure 3.
Figure 3.. Example Raincloud plot.
The raincloud plot combines an illustration of data distribution (the ‘cloud’), with jittered raw data (the ‘rain’). This can further be supplemented by adding boxplots or other standard measures of central tendency and error. See figure3.Rmd for code to generate this figure.
Figure 4.
Figure 4.. Raincloud plots leave little to the imagination.
By replacing the redundantly mirrored probability distribution with a boxplot and raw data-points, the raincloud plot provides the user with information both about individual observations and patterns among them (such as striation or clustering), and overall tendencies in the distribution. As illustrated here, even a boxplot plus raw data may hide bimodality or other crucial facets of the data. See figure4.ipynb for code to generate these figures.
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None

References

    1. Allen M, Poggiali D, Whitaker K, et al. : RainCloudPlots tutorials and codebase (Version v1.0). Zenodo. 2018. 10.5281/zenodo.1402959 - DOI
    1. #barbarplots.2016. Reference Source
    1. Bobko P, Karren R: The Perception of Pearson Product Moment Correlations from Bivariate Scatterplots. Pers Psychol. 1979;32(2):313–325. 10.1111/j.1744-6570.1979.tb02137.x - DOI
    1. Chambers JM: Graphical Methods for Data Analysis.Chapman and Hall/CRC.2017. 10.1201/9781351072304 - DOI
    1. Eklund A: beeswarm: the bee swarm plot, an alternative to stripchart. R package version 0.2.3.2016. Reference Source