\HeaderA{ldahist}{Histograms or Density Plots of Multiple Groups}{ldahist}
\keyword{dplot}{ldahist}
\keyword{hplot}{ldahist}
\begin{Description}\relax
Plot histograms or density plots of data on a single Fisher linear
discriminant.
\end{Description}
\begin{Usage}
\begin{verbatim}
ldahist(data, g, nbins = 25, h, x0 = - h/1000, breaks,
        xlim = range(breaks), ymax = 0, width,
        type = c("histogram", "density", "both"),
        sep = (type != "density"),
        col = 5, xlab = deparse(substitute(data)), bty = "n", ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{data}] vector of data. Missing values (\code{NA}s) are allowed and omitted.

\item[\code{g}] factor or vector giving groups, of the same length as \code{data}.

\item[\code{nbins}] Suggested number of bins to cover the whole range of the data.

\item[\code{h}] The bin width (takes precedence over \code{nbins}).

\item[\code{x0}] Shift for the bins - the breaks are at \code{x0 + h * (..., -1, 0, 1, ...)}

\item[\code{breaks}] The set of breakpoints to be used. (Usually omitted, takes precedence
over \code{h} and \code{nbins}).

\item[\code{xlim}] The limits for the x-axis.

\item[\code{ymax}] The upper limit for the y-axis.

\item[\code{width}] Bandwidth for density estimates. If missing, the Sheather-Jones
selector is used for each group separately.

\item[\code{type}] Type of plot.

\item[\code{sep}] Whether there is a separate plot for each group, or one combined plot.

\item[\code{col}] The colour number for the bar fill.

\item[\code{xlab}] label for the plot x-axis. By default, this will be the name of \code{data}.

\item[\code{bty}] The box type for the plot - defaults to none.

\item[\code{...}] additional arguments to \code{polygon}.

\end{ldescription}
\end{Arguments}
\begin{Section}{Side Effects}
Histogram and/or density plots are plotted on the current device.
\end{Section}
\begin{References}\relax
Venables, W. N. and Ripley, B. D. (2002)
\emph{Modern Applied Statistics with S.} Fourth edition.  Springer.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{plot.lda}{plot.lda}}.
\end{SeeAlso}

