Description Usage Arguments Value Author(s) See Also Examples
Modification of plclust for plotting hclust objects in colour
1 2 3 |
hclust |
hclust object |
lab |
Character vector of labels of leaves of the tree |
lab.col |
Colour for the labels; NA gives the defaul device foreground colour |
hang |
Fraction of the plot height by which labels hang belore the rest of the plot, as in plclust |
... |
Additional arguments passed through to plclust |
Display of dendrogram with coloured leaf labels
originally written by Eva KF Chan, modification by Emma Huang
1 2 3 4 5 6 7 8 9 10 | map <- sim.map(len=rep(100, 5), n.mar=21, eq.spacing=TRUE, include.x=FALSE)
dat <- sim.cross(map, n.ind=500, type="f2")
distmat <- spdist(dat, type="f2")
hc <- hclust(distmat, method="average")
lab <- rep("", 500)
lab[seq(1, 500, 50)] <- "RED"
lab[seq(10, 500, 50)] <- "BLACK"
lab.col <- rep("red", 500)
lab.col[seq(1,500, 50)] <- "blue"
plclust_in_colour(hc, lab, lab.col)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.