How to create a violin plot with ggplot2 in R with geom_violin and geom_dotplot (CC092)
Channel: Riffomonas Project
Date: 2021-04-14

One of the trendy data visualization methods is a violin plot. In this Code Club, Pat will show you how to create a violin plot in  ggplot2 with geom_violin and how to show individual data points on the plot with ggplot2's geom_jitter and geom_dotplot functions. We'll also see how to indicate specific quantiles on the plot. 

Pat will use RStudio and functions from the #ggplot2 package including #geom_violin, #geom_jitter, and #geom_dotplot and functions from other packages from the tidyverse. The accompanying blog post can be found at https://www.riffomonas.org/code_club/2021-04-14-violin-plot.

Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance!

If you're interested in taking an upcoming 3 day R workshop, email me at riffomonas@gmail.com!

R: https://r-project.org
RStudio: https://rstudio.com
Raw data: https://github.com/riffomonas/raw_data/releases/latest
Workshops: https://www.mothur.org/wiki/workshops

You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/

0:00 Introduction
2:01 Creating a violin plot
5:16 Adding individual data to violins w/ geom_jitter
6:02 Adding individual data to violins w/ geom_dotplot
9:23 Adding quantiles to violin plot
11:01 Adding median with stat_summary
11:53 Removing violin body
12:59 Critique of violin and box plots
17:09 Conclusion