milkviz.anno_clustermap#

milkviz.anno_clustermap(data: pd.DataFrame, row_colors: str | List[str] = None, row_colors_cmap: str | List[str] = None, row_colors_order: Dict = None, row_colors_label: Dict = None, row_label: str = None, row_legend_title: str = None, row_legend_split: bool = True, col_colors: str | List[str] = None, col_colors_cmap: str | List[str] = None, col_colors_order: Dict = None, col_colors_label: Dict = None, col_label: str = None, col_legend_title: str = None, col_legend_split: bool = True, heat_cmap: Any = None, legend_padding: float = 5, legend_kw: Dict = None, cbar_kw: Dict = None, categorical_cbar: Optional[List[str]] = None, cbar_title: str = None, **kwargs) sns.matrix.ClusterGrid#

Color or label annotated clustermap

Parameters
  • data – Data use to plot, should be a dataframe, multi-levels annotations should store in MultiIndex

  • {row|col}_label – The index/columns level used for x-axis/y-axis label

  • {row|col}_colors – The index/columns level used to label in color stripe

  • row_colors_cmap – The colormap for row_colors, default: “tab20”

  • col_colors_cmap – The colormap for col_colors, default: “echarts”, a custom colormap in milkviz

  • {row|col}_colors_order – A dict-like mapper to specific the order in each level,

  • {row|col}_colors_label – A dict-like mapper to overwrite the name of each level,

  • {row|col}_legend_split – Whether to split each level of colors stripe

  • {row|col}_legend_title – The title of row legend, when row_legend_split = False

  • legend_padding – The space between legend

  • legend_kw – Options to customize legend, will be applied to all,

  • cbar_kw – Options to customize colorbar, if categorical cbar, use legend_kw

  • heat_cmap – The colormap for heatmap, default: “RdBu_r”

  • categorical_cbar – Turn the colorbar in to categorical legend in text

  • cbar_title – Set the title for colorbar

  • **kwargs – Pass to seaborn.clustermap

Returns

A seaborn.matrix.ClusterGrid instance