Learn R Programming

ribiosPlot (version 1.3.0)

jitter.xyplot: Make boxplots or dotplots with sample-size proportional jitters

Description

Make boxplots or dotplots with jitters of the size proportional to the sample size. See examples.

Usage

jitter.xyplot(x, y, N = 20, factor = 1, ...)

Value

Side effects are used.

Arguments

x

X-axis variable, numeric or factor

y

Y-axis variable, numeric

N

Number of groups that y-axis should be cut

factor

Jitter factor, passed to jitter

...

Other parameters passed to panel.xyplot

Author

Jitao David Zhang <jitao_david.zhang@roche.com>

Examples

Run this code

library(lattice)

testX <- gl(8,5)
testY <- rnorm(40)
xyplot(testY ~ testX)
xyplot(testY ~ testX, panel=jitter.xyplot)

(xyBw <- bwplot(testY ~ testX))
(xyBwJitter <- update(xyBw, panel=jitter.xyplot))

testXnum <- rep(1:8, 5)
xyplot(testY ~ testXnum, panel=jitter.xyplot)

Run the code above in your browser using DataLab