.BG
.VE $Header: /usr3/s/current/s/.help/RCS/plclust,v 1.2 83/12/30 19:32:07 rab Exp $
.FN plclust
.TL
plclust: Plot Trees From Hierarchical Clustering
.CS
plclust(tree, hang, unit, level, hmin, square, labels, plot)
.PP
.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.  Default
0.1.
.AG unit
logical flag. 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.
Default is FALSE.
.AG level
logical flag. 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'.
Default is FALSE.
.AG hmin
optional minimum height at which merges will take place.
Can be used to get rid of irrelevant detail at low levels.
Default 0.
.AG square
logical flag. If TRUE (default), 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 (default), plotting takes place.  If
FALSE, no plotting is done (useful for returned value).
.PP
Graphical parameters may also be supplied as arguments to this
function (see `par').
.RT
if `plot' is FALSE, a structure containing the coordinates
of the leaves of the tree and the interior nodes of the
tree.
.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.
.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:
$T<-?row($author.count,sum)
$T<-?rsweep(author.count,$T,/)
par(mar=c(18,4,4,1))
plclust(hclust(dist($T)),label=author.rowlab)
title("Clustering of Books Based on Letter Frequency")
.PI
.KW plot*
.KW hplot*
.KW dplot*
.KW cluster
.KW hierarchical clustering
.KW array*
.KW multivariate
.WR
