\Header{bannerplot}{Plot Banner (of Hierarchical Clustering)}
\keyword{hplot}{bannerplot}
\keyword{cluster}{bannerplot}
\keyword{utilities}{bannerplot}
\begin{Description}\relax
Draws a ``banner'', i.e. basically a horizontal \code{\Link{barplot}}
visualizing the (agglomerative or divisive) hierarchical clustering or
an other binary dendrogram structure.
\end{Description}
\begin{Usage}
\begin{verbatim}
bannerplot(x, w = rev(x$height), fromLeft = TRUE,
           main, sub, xlab = "Height",  adj = 0,
           col = c(2, 0), border = 0, axes = TRUE, frame.plot = axes,
           rev.xax = !fromLeft, xax.pretty = TRUE,
           labels = NULL, nmax.lab = 35, max.strlen = 5,
           yax.do = axes && length(x$order) <= nmax.lab,
           yaxRight = fromLeft, y.mar = 2.4 + max.strlen/2.5, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a list with components \code{order}, \code{order.lab} and
\code{height} when \code{w}, the next argument is not specified.
\item[\code{w}] non-negative numeric vector of bar widths.
\item[\code{fromLeft}] logical, indicating if the banner is from the left or not.
\item[\code{main,sub}] main and sub titles, see \code{\Link{title}}.
\item[\code{xlab}] x axis label (with `correct' default e.g. for \code{plot.agnes}).
\item[\code{adj}] passed to \code{\Link{title}(main,sub)} for string adjustment.
\item[\code{col}] vector of length 2, for two horizontal segments.
\item[\code{border}] color for bar border; now defaults to background (no border).
\item[\code{axes}] logical indicating if axes (and labels) should be drawn at all.
\item[\code{frame.plot}] logical indicating the banner should be framed;
mainly used when \code{border = 0} (as per default).
\item[\code{rev.xax}] logical indicating if the x axis should be reversed (as
in \code{plot.diana}).
\item[\code{xax.pretty}] logical or integer indicating if
\code{\Link{pretty}()} should be used for the x axis.
\code{xax.pretty = FALSE} is mainly for back compatibility.
\item[\code{labels}] labels to use on y-axis; the default is constructed from
\code{x}.
\item[\code{nmax.lab}] integer indicating the number of labels which is
considered too large for single-name labelling the banner plot.
\item[\code{max.strlen}] positive integer giving the length to which
strings are truncated in banner plot labeling.
\item[\code{yax.do}] logical indicating if a y axis and banner labels should
be drawn.
\item[\code{yaxRight}] logical indicating if the y axis is on the right or left.
\item[\code{y.mar}] positive number specifying the margin width to use when
banners are labeled (along a y-axis).  The default adapts to the
string width and optimally would also dependend on the font.
\item[\code{...}] graphical parameters (see \code{\Link{par}}) may also
be supplied as arguments to this function.
\end{ldescription}
\end{Arguments}
\begin{Note}\relax
This is mainly a utility called from \code{\Link{plot.agnes}},
\code{\Link{plot.diana}} and \code{\Link{plot.mona}}.
\end{Note}
\begin{Author}\relax
Martin Maechler (from original code of Kaufman and Rousseeuw).
\end{Author}

