Wrapper around jitterp that plots multiple jitter plots on the same plotting device (analogous to violins())
multijitter( x, data = NULL, group = NULL, horiz = FALSE, order = NULL, xlab = "", ylab = "", col = "black", pch = 16, spaces = "_", width = 0.1, xlim = NULL, ylim = NULL, add = TRUE, ax = FALSE, srt = 45, adj = c(1, 0), ... )
x
: plotting statistic (numeric vector) or formula object from which a plotting statistic and grouping variable can be extracter (i.e. of form x~group)data
: data.frame object containing x and ygroup
: grouping variablehoriz
: logical indicating whether to plot horizontallyorder
: order of factor levels of categorical factorxlab
: x axis labelylab
: y axis labelcol
: vector of border colorspch
: vector of symbolsspaces
: character string in group to replace with spaces for labels, if not NULLwidth
: standard deviation for jitterxlim
: x limits (data limits used if NULL)ylim
: y limits (data limits used if NULL)add
: logical whether to add to existing plot (default: TRUE)ax
: whether to plot axessrt
: angle for categorical axis text rotationadj
: adjustment for axis labels (defaults to c(1,0), i.e. top right)...
: other arguments to pass on to jitterp() and plot()data.frame(p=rnorm(50), cat=rep(c("A","B","B","B","B"),10))->d multijitter(p~cat,d, add=FALSE)
Useful links