cellflow.plotting.plot_condition_embedding¶
- cellflow.plotting.plot_condition_embedding(df, embedding, dimensions=(0, 1), hue=None, key='condition_embedding', labels=None, col_dict=None, title=None, show_lines=False, return_fig=True, embedding_kwargs=mappingproxy({}), **kwargs)[source]¶
Plot embedding of the conditions.
- Parameters:
df (
DataFrame) – Apandas.DataFramewith embedding and metadata. Column names of embedding dimensions should be consecutive integers starting from 0, e.g. as output fromget_condition_embedding(), and metadata should be in columns with strings.embedding (
Literal['raw_embedding','UMAP','PCA','Kernel_PCA']) – Embedding to plot. Options are “raw_embedding”, “UMAP”, “PCA”, “Kernel_PCA”.dimensions (
tuple[int,int]) – Dimensions of the embedding to plot.key (
str) – Key where the embedding is stored.labels (
list[str]) – Column in'df'with labels to plot. IfNone, doesn’t plot labels.show_lines (
bool) – Whether to show lines connecting points.return_fig (
bool) – Whether to return the figure.embedding_kwargs (
dict[str,Any]) – Additional keyword arguments for the embedding method.kwargs (
Any) – Additional keyword arguments for plotting.
- Return type:
- Returns:
:
Noneormatplotlib.figure.Figure, depending onreturn_fig.