O'Reilly logo

R Data Visualization Cookbook by Atmajitsinh Gohil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating dendrograms with colors and labels

The dendrogram plot in the previous example was all black and white. While making a good presentation, we would like this to be more informative. We would also like our audience to look at the dendrogram and immediately spot clusters and relationships among variables. We will now move a bit away from basic R plots and use a package called dendroextras. A sample dendrogram is as follows:

Creating dendrograms with colors and labels

Getting ready

For creating a plot that is easy to interpret and study, we would use the dendroextras package.

For a better understanding on installing packages in R, please refer to the recipe Installing packages and getting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required