[R] Color individual leaf labels in dendrogram
Kennedy
henrik.aldberg at gmail.com
Fri Oct 15 15:05:08 CEST 2010
Hi,
I have performed a clustering of a matrix and plotted the result with
pltree. See code below. I want to color the labels of the leafs
individually. For example I want the label name "Node 2" to be plotted in
red. How do I do this?
Sincerely
Henrik
library(cluster)
D <- matrix(nr=4,nc=4)
rownames(D) <- c("Node 1","Node 2","Node 3","Node 4")
D[1,] <- c(0,.6,.1,.7)
D[2,] <- c(.6,.0,.3,.9)
D[3,] <- c(.1,.3,0,.9)
D[4,] <- c(.7,.9,.9,0)
C <- agnes(D,diss=T,method="complete")
pltree(C)
--
View this message in context: http://r.789695.n4.nabble.com/Color-individual-leaf-labels-in-dendrogram-tp2996982p2996982.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list