This is a panel function that can create a violin plot. It is typically used in a high-level call to
panel.violin(x, y, box.ratio = 1, box.width, horizontal = TRUE, alpha, border, lty, lwd, col, varwidth = FALSE, bw, adjust, kernel, window, width, n = 50, from, to, cut, na.rm, ..., identifier = "violin")
- x, y
- numeric vector or factor. Violin plots are drawn for each unique value of
- ratio of the thickness of each violin and inter violin space
- thickness of the violins in absolute units; overrides
box.ratio. Useful for specifying thickness when the categorical variable is not a factor, as use of
box.ratioalone cannot achieve a thickness greater than 1.
- logical. If FALSE, the plot is ‘transposed’ in the sense that the behaviours of
xis now the ‘factor’. See documentation of
bwplotfor a fuller explanation.
- alpha, border, lty, lwd, col
- graphical parameters controlling the violin. Defaults are taken from the
- logical. If
FALSE, the densities are scaled separately for each group, so that the maximum value of the density reaches the limit of the allocated space for each violin (as determined by
TRUE, densities across violins will have comparable scale.
- bw, adjust, kernel, window, width, n, from, to, cut, na.rm
- arguments to
density, passed on as appropriate
- arguments passed on to
- A character string that is prepended to the names of grobs that are created by this panel function.
Creates Violin plot of
x for every level of
y. Note that most arguments controlling the display can be supplied to the high-level (typically
bwplot) call directly.
Documentation reproduced from package lattice, version 0.20-15. License: GPL (>= 2)