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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to