Rain Cloud Plots using Half Violin Plot with jittered data points

Rain Cloud Plots using Half Violin Plot with jittered data points

Raincloud plot is another interesting use of Violinplots are. Rain cloud plot is basically a combination of horizontal half violin plots with jittered data points.

Raincloud plot is another interesting use of Violinplots are. Rain cloud plot is basically a combination of horizontal half violin plots with jittered data points. We will see step-by-step examples of how to make raincloud plot in this tutorial in R with ggplot2.

Since there is no special function available for half violinplot in ggplot2, we will rely on @drob’s gist containing a function to make half violinplot. Let us first load tidyverse and set the theme for making half violinplots.

1
2
library(tidyverse)
theme_set(theme_bw(16))
We have slightly modified (fixed a small typo as suggested by a comment in the gist) the function @drob wrote and have it available at datavizpyr.com’s github account.
1
source("https://raw.githubusercontent.com/datavizpyr/data/master/half_flat_violinplot.R")

We will use our favorite Penguin dataset to make rain cloud plots with half violin plots.
1
p2data <- "https://raw.githubusercontent.com/datavizpyr/data/master/palmer_penguin_species.tsv"

1
2
3
4
5
6
7
8
9
10
11
penguins_df <- read_tsv(p2data)
### Parsed with column specification:
### cols(
##   species = col_character(),
##   island = col_character(),
##   culmen_length_mm = col_double(),
##   culmen_depth_mm = col_double(),
##   flipper_length_mm = col_double(),
##   body_mass_g = col_double(),
##   sex = col_character()
### )

Horizontal Half Violin Plots

Let us first get started with horizontal half violin plots using geom_flat_violin() function.

r raincloud plot ggplot2 cloud

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Multi-cloud Spending: 8 Tips To Lower Cost

Mismanagement of multi-cloud expense costs an arm and leg to business and its management has become a major pain point. Here we break down some crucial tips to take some of the management challenges off your plate and help you optimize your cloud spend.

What are the benefits of cloud migration? Reasons you should migrate

To move or not to move? Benefits are multifold when you are migrating to the cloud. Get the correct information to make your decision, with our cloud engineering expertise.

Data Visualization in R with ggplot2: A Beginner Tutorial

Data Visualization in R with ggplot2: A Beginner Tutorial. Learn to visualize your data using R and ggplot2 in this beginner-friendly tutorial that walks you through building a chart for data analysis.

GGPlot2 In R Tutorial | GGPlot2 Basics | Data Visualization In R | R Programming

This video on GGplot Tutorial will help you understand one of R's most widely used data visualization libraries. You will learn how to create different charts such as bar graphs, stacked bar charts, histograms, scatter plots, box plots, and lots more. You will get to know the different functions that ggplot library provides, such as geom_bar, geom_point, geom_line, geom_violin, and others. Let's get started.

ggplot2 in R Tutorial || Data Visualization with GGPlot2 || Data Visualisation in R

You will learn complete data visualization using ggplot2. I will show you how to plot line plot in ggplot2, how to plot bar plot in ggplot2, how to plot hist plot in ggplot and so much more.