\HeaderA{histStack}{Stacked histogram}{histStack}
\keyword{hplot}{histStack}
\begin{Description}\relax
Stacked histogram
\end{Description}
\begin{Usage}
\begin{verbatim}histStack(x, breaks, breaksFun=paste, ylab="frequency", ...) \end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] A list of numeric vectors.
\item[\code{breaks}] Histogram breaks, as in
\code{\LinkA{hist}{hist}}
\item[\code{breaksFun}] Function, can be used to control the formatting
of the bin labels. See example.
\item[\code{ylab}] Label for the Y-axis on the plot
\item[\code{...}] Further arguments that get passed to
\code{\LinkA{barplot}{barplot}}
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function calls \code{\LinkA{hist}{hist}}
for each element of \code{x} and plots the frequencies
as a stacked barplot using
\code{\LinkA{barplot}{barplot}} with \code{beside=FALSE}.
\end{Details}
\begin{Value}
The function is called for its side effect, producing a barplot
on the active graphics device. It returns the result of the call to
\code{\LinkA{barplot}{barplot}}.
\end{Value}
\begin{Author}\relax
Wolfgang Huber \url{http://www.ebi.ac.uk/huber}
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  x    <- list(rnorm(42), rnorm(42)+2)
  br   <- seq(-3, 5, length=13)
  cols <- c("#1D267B", "#ceffc0")
  histStack(x, breaks=br, col=cols)

  histStack(x, breaks=br, col=cols,
            breaksFun=function(z) paste(signif(z, 3)))
\end{ExampleCode}
\end{Examples}

