[ top | up ]

Cleveland Dotcharts

Syntax

dotplot(x, labels=NULL, groups=NULL, gdata=NULL,
	color, gcolor, pch=11, gpch=11, cex, ...)

Arguments

x either a vector or matrix of numeric values (NAs are allowed). If x is a matrix the overall plot consists of juxtaposed dotplots for each row.
labels a vector of labels for each point. For vectors the default is to use names(x) and for matrices the row labels dimnames(x)[[1]].
gdata data values for the groups. This is typically a summary such as the median or mean of each group.
color the color to be used for points an labels.
gcolor the color to be used for group labels and values.
pch the plotting character or symbol to be used.
gpch the plotting character or symbol to be usea for group values.
cex the character size to be used. Setting cex to value smaller than one can be a useful way of avoiding label overlap.
... graphical parameters can also be specified as arguments.

Description

dotplot produces two variants of dotplots as described in Cleveland's graphics book.

Dotcharts are a reasonable substitute for barcharts.

References

Cleveland, W. S. (1985). The Elements of Graphing Data, Monterey, CA: Wadsworth.

Examples

data(deaths) dotplot(deaths, main="Death Rates in VA - 1940") dotplot(t(deaths), main="Death Rates in VA - 1940")