dynamo.pl.louvain(adata, basis='umap', color='louvain', color_key_cmap='Spectral', *args, **kwargs)[source]

Scatter plot for louvain community detection in selected basis.

  • adata (AnnData) – an AnnData object.

  • basis (str) – the reduced dimension stored in adata.obsm. The specific basis key will be constructed in the following priority if exits: 1) specific layer input + basis 2) X_ + basis 3) basis. E.g. if basis is PCA, scatters is going to look for 1) if specific layer is spliced, spliced_pca 2) X_pca (dynamo convention) 3) pca. Defaults to “umap”.

  • color (str) – any column names or gene expression, etc. that will be used for coloring cells. Defaults to “louvain”.

  • color_key_cmap – not used. Left here for backward compatibility. Defaults to “Spectral”.

  • *args – any other positional arguments passed to dynamo.pl.scatters.

  • **kwargs – any other keyword arguments passed to dynamo.pl.scatters.

Return type:



None would be returned in default and the plotted figure would be shown directly. If set save_show_or_return=’return’ as a kwarg, the axes of the plot would be returned.