'How to suppress drawing dendrograms but still cluster in seaborn?

I want to plot a clustermap in seaborn, clustered by both rows and columns. I do not want to draw the dendrograms.

Setting row_cluster=False or col_cluster=False removes the dendrograms, but also stops the clustering.

How do I still 2D cluster but suppress the dendrograms?

This question provides a hack of setting the width of the dendrogram lines to 0. This hack does not work in seaborn 0.7.1.



Solution 1:[1]

To build on the answer by mac389, if you want to suppress the dendrogram in both columns and rows do the following:

cg.ax_row_dendrogram.set_visible(False) #suppress row dendrogram

cg.ax_col_dendrogram.set_visible(False) #suppress column dendrogram

You can also suppress the cbar as indicated by Yacine.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharman