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, row_cluster=True, col_cluster=True, **kwargs) sns.matrix.ClusterGrid#

Color or label annotated clustermap

Parameters
datapd.DataFrame

A dataframe, multi-levels annotations should store in MultiIndex

row_labelstr, array-like of str

The index level used for y-axis label

col_labelstr, array-like of str

The columns level used for x-axis label

row_colorsstr, array-like of str

The index levels used to label in color stripe

col_colorsstr, array-like of str

The columns levels used to label in color stripe

row_colors_cmapdefault: “tab20”

The colormap for row_colors

col_colors_cmapdefault: “echarts”

The colormap for col_colors

row_colors_orderdict

Reorder the items in each level

col_colors_orderdict
row_colors_labeldict

Overwrite the name of each level,

col_colors_labeldict
row_legend_splitbool, default: True

Whether to split each level of colors stripe

col_legend_splitbool, default: True
row_legend_titlestr

The title of row legend, when row_legend_split = False

col_legend_titlestr

The title of col legend, when col_legend_split = False

legend_paddingfloat

The space between legend

legend_kwdict

Options to customize legend, will be applied to all,

cbar_kwdict

Options to customize colorbar, if categorical cbar, use legend_kw

heat_cmapdefault: “RdBu_r”

The colormap for heatmap

categorical_cbararray-like

Turn the colorbar in to categorical legend in text

cbar_titlestr

Set the title for colorbar

row_clusterbool
col_clusterbool
kwargs

Pass to seaborn.clustermap()