Skip to main content

A Python implementation of Rainclouds, originally on R, ggplot2. Written on top of seaborn.

Project description

Latest PyPI release Downloads Latest conda-forge release Binder


A Python implementation of the "Raincloud plot"! See:


You can install it via pip:

pip install ptitprince

or via conda:

conda install -c conda-forge ptitprince

or by cloning this repository and running the following from the root of it:

python install

Academic use

To cite Raincloud plots please use the following information:

Allen M, Poggiali D, Whitaker K et al. Raincloud plots: a multi-platform tool for robust data visualization [version 2; peer review: 2 approved]. Wellcome Open Res 2021, 4:63 (


History of this project

This is a Python version of the "Raincloud plot" (or "PetitPrince plot", depending on the orientation) from R (under ggplot2) to Python. The Raincloud plot is a variant of the violin plot written in R ggplot2 by Micah Allen.

I found a tweet asking for a Python version of the Raincloud plot, and I agreed to give it a try. Alas, the Python version for ggplot2 (plotnine) does not allow to create new styles in a comfortable way. So I decided to write this package using the seaborn library as a foundation.

Then I replicated the plots from the original post by Micah Allen, in Jupyter Notebooks and transformed that code into a Python package.

Since then, the package has received some publicity, and is for example listed in "awesome-python-data-science".



* PtitPrince now relies on seaborn 0.10 and numpy >= 1.13
* kwargs can be passed to the [cloud (default), boxplot, rain/stripplot, pointplot]
                 by preponing [cloud_, box_, rain_, point_] to the argument name.
* End of support for python2, now the support covers python>=3.6

Plans for the future:

  • ask seaborn mantainers to add this new plot type (not gonna happen)
  • add a "move" option in seabon to control the positioning of each plot, as in ggplot2. (either, added in ptitprince)
  • get RainCloud published (done!)
  • add logarithic density estimate (LDE) to the options for the cloud

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ptitprince-0.2.6.tar.gz (12.4 kB view hashes)

Uploaded source

Built Distributions

ptitprince-0.2.6-py3-none-any.whl (10.8 kB view hashes)

Uploaded py3

ptitprince-0.2.6-py2.py3-none-any.whl (10.8 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page