[R] colored nodes in dendrogram
Uwe Ligges
ligges at statistik.tu-dortmund.de
Sat Jul 7 17:55:11 CEST 2012
On 05.07.2012 21:28, Ondřej Mikula wrote:
> Dear list,
> is there a way how to add information to internal nodes (branching
> points) in dendrogram created via plot.agnes function (package
> cluster)?
> I wish to place colored circles on the nodes, but I don't know how to proceed...
> I'll be grateful for any suggestion
> Ondřej
>
Example:
data(votes.repub)
agn1 <- agnes(votes.repub, metric = "manhattan", stand = TRUE)
plot(agn1, which=2)
Now take a look, all information is available from the agnes object:
str(agn1)
and you can, for example, mark the most left branch point with:
points(1.5, agn1$height[1], col="red")
Best,
Uwe Ligges
More information about the R-help
mailing list