vpPlot: Plot data using offsets by quasirandom noise to generate a...

Description Usage Arguments Value See Also Examples

View source: R/violinPoint.R

Description

Arranges data points using quasirandom noise (van der Corput sequence), pseudorandom noise or alternatively positioning extreme values within a band to the left and right to form beeswarm/one-dimensional scatter/strip chart style plots. That is a plot resembling a cross between a violin plot (showing the density distribution) and a scatter plot (showing the individual points) and so here we'll call it a violin point plot.

Usage

1
vpPlot(x = rep("Data", length(y)), y, xaxt = "y", offsetXArgs = NULL, ...)

Arguments

x

a grouping factor for y (optional)

y

vector of data points

xaxt

if 'n' then no x axis is plotted

offsetXArgs

a list with arguments for offsetX

...

additional arguments to plot

Value

invisibly return the adjusted x positions of the points

See Also

offsetX

Examples

1
2
3
4
5
6
7
8
dat<-list(
  'Mean=0'=rnorm(200),
  'Mean=1'=rnorm(50,1),
  'Bimodal'=c(rnorm(40,-2),rnorm(60,2)),
  'Gamma'=rgamma(50,1)
)
labs<-factor(rep(names(dat),sapply(dat,length)),levels=names(dat))
vpPlot(labs,unlist(dat))

vipor documentation built on May 1, 2019, 7:06 p.m.