Description Usage Arguments Details Value Author(s) References Examples
Create a violin plot within the ggplot2 framework. The code for calculating violins is based on the vioplot 0.2
package.
1 |
data |
dataset |
x |
factor variable |
y |
values |
bandwidth |
value for kernel density |
alpha |
parameter for alpha blending |
fill |
color or symbol to fill in violins. |
... |
other parameters |
The idea of a violin plot is, that additionally to the boxes of a boxplot, two density curves are plotted opposing each other, and the space between them is filled to create the shape of a 'violin'. As for any density estimation, a bandwidth parameter is used to control smoothness. Violin plots have been introduced by hintze.
ggplot2 layer of violins
Heike Hofmann
Hintze, J. L. and R. D. Nelson (1998). Violin plots: a box plot-density trace synergism. The American Statistician, 52(2):181-4.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.