plotting results of hierarchical clustering on top of a matrix of data

The question does not define matrix very well: “matrix of values”, “matrix of data”. I assume that you mean a distance matrix. In other words, element D_ij in the symmetric nonnegative N-by-N distance matrix D denotes the distance between two feature vectors, x_i and x_j. Is that correct? If so, then try this (edited June … Read more

Label and color leaf dendrogram

Here is a solution for this question using a new package called “dendextend“, built exactly for this sort of thing. You can see many examples in the presentations and vignettes of the package, in the “usage” section in the following URL: https://github.com/talgalili/dendextend Here is the solution for this question: (notice the importance of how to … Read more