As Rafael Irizarry would argue, violin plots display distributions that are at the same time vertical and mirrored, not a way most people are used to recognizing a distribution format. So why we not to plot distributions in a way most people are used to recognize?People from ggjoy
package heard this appeal.
This package is ggplot2
supplement. Following code demonstrates how to brew the so called joy plots.
Make sure to have devtools
installed once you get ggjoy
from GitHub. Also, we are usingfiction
data set created at Recipe Manually sorting and coloring violins. If you do not have it in you environment, you may want to go back and rerun the Getting ready section. dplyr
is also required:
> if( !require(devtools)){ install.packages('devtools')}
> if( !require(ggjoy)){ devtools::install_github('clauswilke/ggjoy')}
> if( !require(dplyr)){ install.packages('dplyr')}
These three packages plus ggplot2
are going to draw a joy plot.