episcanpy.api.pl.dendrogram

episcanpy.api.pl.dendrogram(adata, groupby, dendrogram_key=None, orientation='top', remove_labels=False, show=None, save=None)

Plots a dendrogram of the categories defined in groupby.

See dendrogram().

Parameters
adata : AnnDataAnnData

groupby : strstr

Categorical data column used to create the dendrogram

dendrogram_key : str | NoneOptional[str] (default: None)

Key under with the dendrogram information was stored. By default the dendrogram information is stored under .uns[‘dendrogram_’ + groupby].

orientation : strstr (default: 'top')

Options are top (default), bottom, left, and right. Only when show_correlation is False.

remove_labels : boolbool (default: False)

{show_save_ax}

Returns

matplotlib.axes.Axes

Examples

>>> import scanpy as sc
>>> adata = sc.datasets.pbmc68k_reduced()
>>> sc.tl.dendrogram(adata, 'bulk_labels')
>>> sc.pl.dendrogram(adata, 'bulk_labels')