Draws a “banner”, i.e. basically a horizontal barplot
visualizing the (agglomerative or divisive) hierarchical clustering or
an other binary dendrogram structure.
bannerplot(x, w = rev(x$height), fromLeft = TRUE,
main=NULL, sub=NULL, 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)
a list with components order
, order.lab
and
height
when w
, the next argument is not specified.
non-negative numeric vector of bar widths.
logical, indicating if the banner is from the left or not.
main and sub titles, see title
.
x axis label (with ‘correct’ default e.g. for
plot.agnes
).
passed to title(main,sub)
for string adjustment.
vector of length 2, for two horizontal segments.
color for bar border; now defaults to background (no border).
logical indicating if axes (and labels) should be drawn at all.
logical indicating the banner should be framed;
mainly used when border = 0
(as per default).
logical indicating if the x axis should be reversed (as
in plot.diana
).
logical or integer indicating if
pretty()
should be used for the x axis.
xax.pretty = FALSE
is mainly for back compatibility.
labels to use on y-axis; the default is constructed from
x
.
integer indicating the number of labels which is considered too large for single-name labelling the banner plot.
positive integer giving the length to which strings are truncated in banner plot labeling.
logical indicating if a y axis and banner labels should be drawn.
logical indicating if the y axis is on the right or left.
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.
graphical parameters (see par
) may also
be supplied as arguments to this function.
Martin Maechler (from original code of Kaufman and Rousseeuw).
data(agriculture)
bannerplot(agnes(agriculture), main = "Bannerplot")
Run the code above in your browser using DataLab