Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seaborn clustermap not displaying all row annotations

heatmap picture

I am creating a clustermap of a list of 529 genes. For some reason not all the genes in the index of the dataframe are being displayed in the clustermap. I've attached an image showing the issue. Any help would be much appreciated.

def create_heatmap(dataframe, title):
import seaborn as sns
import matplotlib.pyplot as pyplot
sns_plot = sns.clustermap(dataframe,mask=False,row_cluster=True,linewidth=.05,
                          linecolor="grey",col_cluster=False,standard_scale=0
                          ,cmap="Greys",square=True,figsize=(12,(.2*(len(dataframe.index)))))
sns_plot.savefig("{}.png".format(title))
return sns_plot
like image 640
decabytes Avatar asked Aug 13 '18 19:08

decabytes


1 Answers

You would probably want to use the yticklabels keyword argument to label all rows in the heatmap:

sns.clustermap(...,  yticklabels=True)
like image 151
ImportanceOfBeingErnest Avatar answered Nov 14 '22 23:11

ImportanceOfBeingErnest