scanpy.pl.clustermap
- scanpy.pl.clustermap(adata, obs_keys=None, use_raw=None, show=None, save=None, **kwds)
Hierarchically-clustered heatmap.
Wraps
seaborn.clustermap()forAnnData.- Parameters
- adata :
AnnDataAnnData Annotated data matrix.
- obs_keys :
str|NoneOptional[str] (default:None) Categorical annotation to plot with a different color map. Currently, only a single key is supported.
- use_raw :
bool|NoneOptional[bool] (default:None) Whether to use
rawattribute ofadata. Defaults toTrueif.rawis present.- show :
bool|NoneOptional[bool] (default:None) Show the plot, do not return axis.
- save :
str|bool|NoneUnion[str,bool,None] (default:None) If
Trueor astr, save the figure. A string is appended to the default filename. Infer the filetype if ending on {'.pdf','.png','.svg'}.- ax
A matplotlib axes object. Only works if plotting a single component.
- **kwds
Keyword arguments passed to
clustermap().
- adata :
- Returns
If
showisFalse, aClusterGridobject (seeclustermap()).
Examples
Soon to come with figures. In the meanwile, see
clustermap().>>> import scanpy as sc >>> adata = sc.datasets.krumsiek11() >>> sc.pl.clustermap(adata, obs_keys='cell_type')