plot.sparge: Visually compare all points from different univariate...

View source: R/sparge.R

plot.spargeR Documentation

Visually compare all points from different univariate distributions

Description

Visually compare continuuous univariate distributions using jittered and transparent points.

Usage

## S3 method for class 'sparge'
plot(x, jit.f=1, zl=TRUE, xlim=range(unlist(unlist(x))), 
                  add=FALSE, pd=0, box.brdrs='gray', col=1, alpha=.3, ...)

Arguments

x

a list of vectors each with values drawn from the same distribution

jit.f

factor for random jittering (see 'jitter()'

zl

should we add a horizontal [zero] line at x=0?

add

should we add to the existing plot?

pd

'position dodge' moves all y axis plotting positions up or down by this factor

xlim

x axis plot limits

alpha

transparency level for [overlapping] points

box.brdrs

the color of the borders of the box plots surrounding all distributions

col

(vector of) [base] colors of the points of the distribution(s)

...

other parameters passed on to plot

Value

a 'sparge' [sprinkle/smear] plot of point distributions

See Also

See also 'boxplot' and 'stripchart' in package 'graphics' as well as 'violin', 'bean', 'ridgelines', and 'raincloud' plots.

Examples


N=300
x=lapply(sample(1:5), function(avg) (rnorm(N,avg)))
plot.sparge(x, col=rep('blue',length(x)), main='sparge plots:\nfor distributional comparison')



caroline documentation built on Nov. 9, 2023, 9:07 a.m.