Description Usage Arguments Value Examples
View source: R/utility_functions.R
Adds a violin plot to an already existing figure.
1 | violinPlot(x, pos, scaleH = 0.5, est = T, interval = list(), ...)
|
x |
a vector of values used to create the
violin plot, or a named list where |
pos |
the x-axis position at which to draw the violin plot |
scaleH |
the maximum half-width of the violin plot. |
est |
a logical value; if true, the density is
empirically estimated, otherwise the density is
extracted from the list |
interval |
allows for extra options governing ways to restrict the violin plot to a desired sub-interval.
|
... |
additional plotting parameters for
|
If out
is set to TRUE, returns the proportion of
values in x
above, below, or within the interval defined
by crit
.
1 2 3 4 5 6 | x = rnorm(100)
blankPlot(yDim=c(-6,6))
crit = mean(x)
violinPlot( x, .5, interval = list( crit = crit ), col = 'grey',
border = NA )
violinPlot( x, .5, lwd = 2 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.