Written and maintained by CASRAI Editorial Board
Last updated
A raincloud plot shows one group of data three ways at once: a half-violin (the smoothed distribution), the raw data points as jittered dots, and a box plot or mean with an error interval. It was introduced by Allen and colleagues in 2019 as an alternative to the bar plot with error bars, which can hide the shape of the data. After reading this page you should be able to say what each part means, when to prefer a raincloud plot over a bar, box or violin plot, and which package to use in R, Python or Matlab.
What is a raincloud plot?
Allen et al. (2019) describe raincloud plots as combining a “split-half violin” (an un-mirrored probability density function plotted against the redundant data axis), raw jittered data points, and a standard visualization of central tendency and error, such as a boxplot. The “cloud” is the half-violin; the “rain” is the dots falling beneath it.
The three parts and what each one tells you
- Half-violin (cloud): the estimated shape of the distribution, drawn on one side only. A full violin plot mirrors the same curve on both sides; the raincloud design drops the mirror image because it repeats information.
- Jittered raw points (rain): every observation is visible, so sample size, gaps, clusters and outliers can be seen directly. Compare a plain strip plot, which shows points without the density curve.
- Summary (box or mean with interval): a compact statement of the centre and spread. A box plot shows the median and quartiles; the choice of summary is yours.
Raincloud plot vs bar plot, box plot and violin plot
Allen et al. (2019) motivate the design by noting that bar plots with error bars have been criticized for distorting effect size, hiding underlying patterns in the raw data and obscuring the assumptions behind the most common statistical tests. Their Figure 1 uses two simulated datasets with the same mean (50) and standard deviation (25) and 1,000 observations each: the bar plots with standard-error bars look equivalent, yet one group was drawn from an exponential distribution. For comparison, see bar plots in seaborn.
| Plot | What it shows | Limitation noted by Allen et al. (2019) |
|---|---|---|
| Bar plot with error bars | One summary value per group plus an error interval | Can distort effect size and obscure the raw data pattern and test assumptions |
| Violin plot with box plot | Smoothed distribution (Hintze and Nelson, 1998) plus box summary (Tukey, 1970) | “Needlessly mirrors information about the redundant data axis” |
| Dot plot | Individual points stacked in bins | Depends on bin width and dot size |
| Raincloud plot | Half-violin, raw points and a summary together | The smoothing setting still shapes the curve, so state it |
Worked example: same mean, different shape
Illustrative data written for this page, not from a real study. Two groups of ten scores:
- Group A: 0, 10, 20, 25, 30, 30, 35, 40, 50, 60
- Group B: 12, 14, 15, 17, 18, 20, 24, 30, 70, 80
Group A sums to 300, so its mean is 300 / 10 = 30. Group B also sums to 300 (12+14+15+17+18+20+24+30+70+80), so its mean is also 30. A bar chart would draw two bars at 30. The sample standard deviations are 17.80 (A) and 24.39 (B), giving standard errors of 17.80 / √10 = 5.63 and 24.39 / √10 = 7.71: two error bars of broadly similar size.
The medians differ. A is 30.0 (the average of the 5th and 6th ordered values, 30 and 30); B is 19.0 (the average of 18 and 20). With linear-interpolation quartiles, A’s are 21.25 and 38.75 and B’s are 15.5 and 28.5. In a raincloud plot the reason is visible at once: eight of group B’s points sit between 12 and 30 and two lie far out at 70 and 80, so the half-violin has a long right tail and the mean is pulled above the median. The bars alone could not show that.
How to read a raincloud plot
| What you see | Reading |
|---|---|
| Cloud peaks on one side with a long tail | Skewed data; the mean and median will differ (see box plot skewness) |
| Isolated dots far from the cloud | Candidate outliers; inspect them rather than delete them |
| Few dots | Small sample, so the smoothed curve is less trustworthy |
For background on distribution shapes, see types of distributions.
When to use a raincloud plot
Use it when you compare groups or conditions and want readers to see the data behind the summary. Allen et al. (2019) provide variations for ordinal data and repeated measures; for repeated measures, the open-visualizations repository (jorvlan/open-visualizations on GitHub) draws slope lines linking each individual’s observations across conditions.
Assumptions, smoothing and common mistakes
- Smoothing is a choice. The half-violin is a smoothed estimate. Allen et al. report that smoothing can be controlled in each implementation:
adjustin the Rgeom_flat_violin,bw/sigma in Python andbandwidthin Matlab. Report the setting you used. - Too few observations. A smoothed curve from a handful of points implies more structure than the data hold; let the dots carry the message.
- Unlabelled summary. Say in the legend whether the box shows the median and quartiles, or the mean and an interval, and which interval.
- Treating the plot as a test. It displays data; it does not replace an appropriate statistical analysis.
How to make a raincloud plot in R, Python or Matlab
The authors’ repository (github.com/RainCloudPlots/RainCloudPlots, MIT license) provides code for R, Python and Matlab. As listed in its README on 2026-11-07:
- R:
ggrain(install.packages("ggrain"), functiongeom_rain()) orraincloudplots(remotes::install_github("jorvlan/raincloudplots"), functionsdata_1x1()andraincloud_1x1()). - Python:
PtitPrince(pip install ptitprince, functionpt.RainCloud()). - Matlab: code in the same repository.
# R
library(ggplot2); library(ggrain)
ggplot(df, aes(x = group, y = score, fill = group)) + geom_rain()
# Python
import ptitprince as pt
pt.RainCloud(x="group", y="score", data=df)
Check each package’s documentation for current arguments. To verify the medians and quartiles in the worked example, statistics.median(x) and statistics.quantiles(x, n=4, method="inclusive") in Python return the values quoted above.
How to report and cite it
In the figure legend, name the elements and settings, for example: “Raincloud plot of scores by group. Half-violins show kernel density estimates (default bandwidth); dots are individual participants; boxes show the median and interquartile range.” The repository README asks users to cite the paper:
Allen, M., Poggiali, D., Whitaker, K., Marshall, T. R., van Langen, J., & Kievit, R. A. (2019). Raincloud plots: A multi-platform tool for robust data visualization. Wellcome Open Research, 4, 63. https://doi.org/10.12688/wellcomeopenres.15191.2
FAQ
Why is it called a raincloud plot?
The smoothed half-violin looks like a cloud and the jittered raw points beneath it look like rain.
Is a raincloud plot the same as a violin plot?
No. It uses only one half of the violin and adds the raw data points and a summary such as a box plot.
Does it work for repeated-measures data?
Yes. The tutorial covers repeated-measures variations, and slope lines can connect each individual’s points across conditions.
Sources
- Allen et al. (2019), Wellcome Open Research 4:63 (version 2, 2021), open access, https://pmc.ncbi.nlm.nih.gov/articles/PMC6480976/ (read 2026-11-07).
- RainCloudPlots repository README, https://github.com/RainCloudPlots/RainCloudPlots (read 2026-11-07).







