dotplot {base} | R Documentation |
dotplot(x, labels = NULL, groups = NULL, gdata = NULL, cex = par("cex"),
pch = 21, gpch = 21, bg = par("bg"), color = par("fg"),
gcolor = par("fg"), lcolor = "gray", ...)
x |
either a vector or matrix of numeric values
( |
labels |
a vector of labels for each point.
For vectors the default is to use |
groups |
an optional factor indicating how the
elements of |
gdata |
data values for the groups. This is typically a summary such as the median or mean of each group. |
cex |
the character size to be used. Setting |
pch |
the plotting character or symbol to be used. |
gpch |
the plotting character or symbol to be usea for group values. |
bg |
the background color to be used. |
color |
the color to be used for points an labels. |
gcolor |
the color to be used for group labels and values. |
lcolor |
the color to be used for the horizontal lines. |
... |
graphical parameters can also be specified as arguments. |
This function is invoked for its side effect, which is to produce two variants of dotplots as described in Cleveland's graphics book.
Dot plots are a reasonable substitute for bar plots.
Cleveland, W. S. (1985). The Elements of Graphing Data, Monterey, CA: Wadsworth.
data(deaths)
dotplot(deaths, main = "Death Rates in Virginia - 1940")
dotplot(t(deaths), main = "Death Rates in Virginia - 1940")