[Rd] edge label position in plot.dendrogram(..., horiz=T) (PR#13313)

yan at pixie.org.uk yan at pixie.org.uk
Fri Nov 21 14:20:03 CET 2008


Full_Name: Yan Wong
Version: 2.8.0
OS: Mac OS X 10.4
Submission from: (NULL) (78.149.183.231)


Using R 2.8.0 under Mac OS X, I find that edge labels do not change position to
account for the "horiz" argument of  plot.dendrogram, for example

> d <- as.dendrogram(hclust(dist(list(a=1,b=2,c=4,d=5))))
> attr(d[[1]], "edgetext") <- "a & b"
> attr(d[[2]], "edgetext") <- "c & d"
> plot(d, horiz="F") #OK
> plot(d, horiz="T") #edge labels do not change position to account for horiz

I think this is because stats:::plotNode doesn't deal with horiz=TRUE on line
152 (starting "polygon(mx + c(-hl3, hl3),").



More information about the R-devel mailing list