SpindlePlot() creates a histogram arranged analogously to a violin plot

SpindlePlot(
  x,
  nBin = 20,
  width = 1,
  xlab = "",
  log = FALSE,
  Behind = function() {
 },
  clip,
  weights = NULL,
  ...
)

Arguments

x

data.frame or matrix in which columns correspond to distinct values to plot.

nBin

Integer giving number of bins

width

Numeric giving relative width of each spindle

log

Logical specifying whether to log-transform the y axis

Behind

Function to be executed before drawing the spindles

weights

Numeric specifying weight of each observation, for a weighted mean.

...

Additional arguments to plot()

cols

Vector giving colour for each spindle