.BG
.FN plclust
.TL
Plot Trees From Hierarchical Clustering
.CS
plclust(tree, hang=.1, unit=FALSE, level=FALSE,
        hmin=0, square=TRUE, labels, plot=TRUE)
.AG tree
a hierarchical clustering tree, of the form returned by
function `hclust'.
.AG hang
the fraction of the height of the plot that any individual
node will hang below the cluster that it joins.  A value of
\-1 will cause all individuals to start at y-value 0.
.AG unit
if `TRUE', the heights of the merges will be
ignored and instead merge i will occur at height i.  Useful
for spreading out the tree to see the sequence of merges.
.AG level
if `TRUE', plotted tree will be "leveled",
where merges in different subtrees are arbitrarily assigned
the same height in order to compress the vertical scale.
Particularly useful with `unit=TRUE'.
.AG hmin
optional minimum height at which merges will take place.
Can be used to get rid of irrelevant detail at low levels.
.AG square
if `TRUE', the tree is plotted with
"U" shaped branches, if `FALSE', it has "V" shaped branches.
.AG labels
optional character vector of labels for the leaves of the
tree.  If omitted, leaves will be labelled by number.  To
omit labels entirely, use `labels=FALSE'.
.AG plot
logical flag.  If `TRUE', plotting takes place.  If `FALSE',
no plotting is done (useful for returned value).
.GR
.RT
an object containing the coordinates
of the leaves of the tree and the interior nodes of the
tree.
If `plot' is `TRUE', the object will be invisible.
.RC x,y
x and y coordinates of the leaves of the tree, i.e.,
`x[i],y[i]' gives the  coordinates of the leaf corresponding
to the `i'th individual.
.RC xn,yn
x and y coordinates of the interior nodes of the tree, i.e.,
`xn[i],yn[i]' gives the coordinates of the node
representing the `i'th merge.
.SA
`hclust', `dist', `labclust', `subtree', `cutree'.
.br
.ne 5
.EX
plclust(hclust(distances))

plclust(tree,label=FALSE)   # plot without labels
xy <- plclust(tree,plot=FALSE)       # no plot, save structure
# allow user to point at leaf and have it identified
identify(xy)

# the example plot is produced by:
sums <- apply(author.count,1,sum)
adjusted <- sweep(author.count,1,sums,"/")
par(mar=c(18,4,4,1))
plclust(hclust(dist(adjusted)),label=dimnames(author.count)[[1]])
title("Clustering of Books Based on Letter Frequency")
.PI
.KW hplot
.KW dplot
.KW cluster
.KW array
.KW multivariate
.WR
