Code and tutorials to visualise your data in a way that is both beautiful and statistically valid.
ggrain
- R package
Check out theggrain
Github and the vignette for more details + tutorials!
install.packages('ggrain')
library(ggrain)
ggplot(iris, aes(Species, Sepal.Length, fill = Species)) +
geom_rain()
raincloudplots
- R package
remotes::install_github('jorvlan/raincloudplots')
library(raincloudplots)
df_1x1 <- data_1x1(
array_1 = iris$Sepal.Length[1:50],
array_2 = iris$Sepal.Length[51:100],
jit_distance = .09,
jit_seed = 321)
raincloud_1_h <- raincloud_1x1(
data = df_1x1,
colors = (c('dodgerblue','darkorange')),
fills = (c('dodgerblue','darkorange')),
size = 1,
alpha = .6,
ort = 'h') +
scale_x_continuous(breaks=c(1,2), labels=c("Group1", "Group2"), limits=c(0, 3)) +
xlab("Groups") +
ylab("Score") +
theme_classic()
raincloud_1_h
PtitPrince
- Python package
Check out the Github and the tutorial for more details!
pip install ptitprince
import ptitprince as pt
pt.RainCloud(x = dx, y = dy, data = df, palette = pal, bw = sigma,
width_viol = .6, ax = ax, orient = ort)
We really hope you find these tutorials helpful and want to use the code in your next paper or presentation!
This repository is made available under the MIT license which means you're welcome to use and remix the contents so long as you credit the creators: Micah Allen, Davide Poggiali, Kirstie Whitaker, Tom Rhys Marshall, Jordy van Langen, Nicholas Judd and Rogier Kievit.
If you use rainclouds please cite us!
- Allen, M., Poggiali, D., Whitaker, K., Marshall, T. R., van Langen, J., & Kievit, R. A. Raincloud plots: a multi-platform tool for robust data visualization [version 2; peer review: 2 approved] Wellcome Open Research 2021, 4:63. https://doi.org/10.12688/wellcomeopenres.15191.2
We'd love to hear your thoughts and any feedback you have. The best place to leave comments on the paper and the project in general is at the Wellcome Open Research paper. Just scroll to the bottom of that page (or click on the link at the side) and leave us feedback or ask a question.
You can also open an issue or submit a pull request to this repository if you find a bug! If it is a package specific question please make an issue on the ggrain
or PtitPrince
repositories.
Just check out our contributing guidelines for help getting started.
Happy plotting!