\Header{dotplot}{Cleveland Dot Plots}
\keyword{hplot}{dotplot}
\begin{Usage}
\begin{verbatim}
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", ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x}] either a vector or matrix of numeric values
(\texttt{NA}s are allowed).
If \texttt{x} is a matrix the overall plot consists of
juxtaposed dotplots for each row.
\item[\texttt{labels}] a vector of labels for each point.
For vectors the default is to use \texttt{names(x)} and for
matrices the row labels \texttt{dimnames(x)[[1]]}.
\item[\texttt{groups}] an optional factor indicating how the
elements of \texttt{x} are grouped.
If \texttt{x} is a matrix, \texttt{groups} will default to the columns
of \texttt{x}.
\item[\texttt{gdata}] data values for the groups.
This is typically a summary such as the median or mean
of each group.
\item[\texttt{cex}] the character size to be used.  Setting \texttt{cex}
to a value smaller than one can be a useful way of avoiding label
overlap.
\item[\texttt{pch}] the plotting character or symbol to be used.
\item[\texttt{gpch}] the plotting character or symbol to be usea for group
values.
\item[\texttt{bg}] the background color to be used.
\item[\texttt{color}] the color to be used for points an labels.
\item[\texttt{gcolor}] the color to be used for group labels and values.
\item[\texttt{lcolor}] the color to be used for the horizontal lines.
\item[\texttt{...}] graphical parameters can also be specified as arguments.
\end{ldescription}
\end{Arguments}
\begin{Value}
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.\end{Value}
\begin{References}
Cleveland, W. S. (1985).
\emph{The Elements of Graphing Data},
Monterey, CA: Wadsworth.\end{References}
\begin{Examples}
\begin{ExampleCode}
data(deaths)
dotplot(deaths, main = "Death Rates in Virginia - 1940")
dotplot(t(deaths), main = "Death Rates in Virginia - 1940")
\end{ExampleCode}
\end{Examples}

