Seaborn clustermap 不显示所有行注释
Seaborn clustermap not displaying all row annotations
我正在创建包含 529 个基因列表的聚类图。由于某种原因,并非数据帧索引中的所有基因都显示在聚类图中。我附上了一张显示问题的图片。任何帮助将不胜感激。
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
您可能希望使用 yticklabels
关键字参数来标记热图中的所有行:
sns.clustermap(..., yticklabels=True)
我正在创建包含 529 个基因列表的聚类图。由于某种原因,并非数据帧索引中的所有基因都显示在聚类图中。我附上了一张显示问题的图片。任何帮助将不胜感激。
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
您可能希望使用 yticklabels
关键字参数来标记热图中的所有行:
sns.clustermap(..., yticklabels=True)