Member-only story
How To Pick Color Palettes for Dendrograms in R Programming
Here’s how to jazz up your clustering analysis with a colorful dendrogram using the pals library
I explained the value of dendrograms in a previous R programming post, as well as covering the concept of pruning a dendrogram. One subtopic that needed a dedicated post is the idea of selecting colors in a dendrogram. This is that dedicated post.
Colors can be useful in dendrograms when you have many leaves to identify. Sometimes too many leaves create a crowded dendrogram visualization, making clusters difficult to understand. So color through the use of palettes introduces highlights for the dendrogram features.
Types of Color Palettes and Their Uses
Palettes can have one of three types each with a specific meaning according to the data. There are sequential palettes, which represent ordered data from a low value to a high value. This is useful for indicating a sequence.
The second type is diverging, which emphasizes a dataset's middle and extreme endpoints. If you have created a regression, you’ve seen a diverging palette via correlation plots in which variables are correlated between — 1, 0, and 1. The degree of color in a correlation plot is an example…