GPCCA.plot_terminal_states(states=None, color=None, discrete=False, mode=PlotMode.EMBEDDING, time_key='latent_time', same_plot=True, title=None, cmap='viridis', **kwargs)

Plot continuous or categorical observations in an embedding or along pseudotime.

  • states (Union[str, Sequence[str], None]) – States to plot.

  • color (Optional[str]) – Key in anndata.AnnData.obs.

  • discrete (bool) – Whether to plot the data as continuous or discrete observations. If the data cannot be plotted as continuous observations, it will be plotted as discrete.

  • mode (Literal[‘embedding’, ‘time’]) –

    Valid options are:

    • ’embedding’ - plot the embedding while coloring in continuous or categorical observations.

    • ’time’ - plot the pseudotime on x-axis and the probabilities/memberships on y-axis.

  • time_key (str) – Key in anndata.AnnData.obs where pseudotime is stored. Only used when mode = 'time'.

  • title (Union[str, Sequence[str], None]) – Title of the plot(s).

  • same_plot (bool) – Whether to plot the data on the same plot or not. Only use when mode = 'embedding'. If True and discrete = False, color is ignored.

  • cmap (str) – Colormap for continuous data.

  • kwargs (Any) – Keyword arguments for scvelo.pl.scatter().

Return type



Nothing, just plots the figure. Optionally saves it based on save.