atlas.pl.plot_embedding

Contents

atlas.pl.plot_embedding#

atlas.pl.plot_embedding(mudata, embedding_key='X_umap', observation='pseudotime', save=None, cmap='Blues', **kwargs)#

Plot a low-dimensional embedding of cells colored by a given observation.

This function creates a scatter plot of cells in a specified embedding space (e.g. UMAP, PCA) using values from mudata.obs for coloring.

Parameters:
  • mudata (MuData) – MuData object containing cell-level metadata in .obs and embeddings in .obsm.

  • embedding_key (str (default: 'X_umap')) – Key in mudata.obsm specifying the embedding to use for visualization (e.g. "X_umap", "X_pca").

  • observation (str (default: 'pseudotime')) – Column name in mudata.obs used to color the cells.

  • save (bool | str | None (default: None)) – If True, save the figure using scvelo defaults. If a string, specifies the filename. If None, the plot is not saved.

  • cmap (str (default: 'Blues')) – Colormap used for continuous observations. Ignored for categorical variables.

  • **kwargs – Additional keyword arguments passed to scvelo.pl.scatter().

Return type:

None

Returns:

None Displays (and optionally saves) the embedding plot.

Warns:
  • UserWarning – If observation is not found in mudata.obs.

  • UserWarning – If embedding_key is not found in mudata.obsm.