moscot.plotting.cell_transition¶
- moscot.plotting.cell_transition(obj, key='cell_transition', row_label=None, col_label=None, annotate='{x:.2f}', fontsize=7.0, cmap='viridis', cbar_kwargs=mappingproxy({}), ax=None, return_fig=False, figsize=None, dpi=None, save=None, **kwargs)[source]¶
Plot an aggregate cell transition matrix.
See also
See Cell transitions on how to
compute
and plot the cell transitions.
- Parameters:
obj (
Union
[AnnData
,Tuple
[AnnData
,AnnData
],CompoundProblem
]) –Object containing the
cell transition
data. Valid options are:AnnData
- annotated data object containing the data.CompoundProblem
- one of themoscot.problems
.
key (
str
) – Key inuns['moscot_results']
where the cell transition data is stored.row_label (
Optional
[str
]) – Label for the rows of the transition matrix.col_label (
Optional
[str
]) – Label for the columns of the transition matrix.annotate (
Optional
[str
]) – Format used when annotating the cells. IfNone
, don’t annotate the cells.fontsize (
float
) – Font size for the annotations.cbar_kwargs (
Mapping
[str
,Any
]) – Keyword arguments forcolorbar()
.ax (
Optional
[Axes
]) – Ax used for plotting. IfNone
, create a new one.return_fig (
bool
) – Whether to return the figure.figsize (
Optional
[Tuple
[float
,float
]]) – Size of the figure.save (
Union
[str
,Path
,None
]) – Path where to save the figure.
- Return type:
- Returns:
: If
return_fig = True
, returns and plots the figure. Otherwise, just plots the figure.