You, for example, are not reproducible in the sense that we do not have access to data. I can say that you should look at the dendextend R package . It offers functions for cutting dendrograms, as well as coloring labels and branches. The Quick Introduction guide shows the main use of functions such as labels_colors and color_branches to create graphs like this:

In your case, since your branches seem to be at the same height, you are unlikely to have direct control over their reductions. What you can do is use branches_attr_by_clusters to specifically control the colors of the subclusters you need. Here is an example:
x <- c(1:3, 6:8) dend <- as.dendrogram(hclust(dist(x), method = "ave")) library(dendextend) labels(dend) <- x[order.dendrogram(dend)] # due to the ties - there is specific reason to have this be these 3 clusters: cutree(dend, k = 3)[order.dendrogram(dend)] par(mfrow = c(1,2)) dend1 <- color_branches(dend, k = 3) dend1 <- color_labels(dend1, k = 3) plot(dend1, main = "default cuts by cutree") # let force it to be another 3 clusters: dend2 <- branches_attr_by_clusters(dend, c(1, 2,2, 3,3,3), c("gold", "darkgreen", "blue")) # coloring the labels is actually the easiest part: labels_colors(dend2) <- c("gold", "darkgreen", "blue")[c(1, 2,2, 3,3,3)] plot(dend2, main = "Manual cuts")

source share