powered by
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), ... )
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.frame object containing x and y
grouping variable
logical indicating whether to plot horizontally
order of factor levels of categorical factor
x axis label
y axis label
vector of border colors
vector of symbols
character string in group to replace with spaces for labels, if not NULL
standard deviation for jitter
x limits (data limits used if NULL)
y limits (data limits used if NULL)
logical whether to add to existing plot (default: TRUE)
whether to plot axes
angle for categorical axis text rotation
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)
Run the code above in your browser using DataLab