moscot.plotting.sankey¶
- moscot.plotting.sankey(obj, key='sankey', captions=None, title=None, colors=None, alpha=1.0, interpolate_color=False, cmap='viridis', ax=None, return_fig=False, figsize=None, dpi=None, save=None, **kwargs)[source]¶
Plot a Sankey diagram between cells across time points.
See also
See Sankey diagram on how to
compute
and plot the Sankey diagram.
- Parameters:
obj (
Union
[AnnData
,TemporalProblem
,LineageProblem
,SpatioTemporalProblem
]) –Object containing the
Sankey diagram
data. Valid options are:AnnData
- annotated data object containing the data.TemporalProblem
/LineageProblem
/SpatioTemporalProblem
- one of thetemporal problems
.
key (
str
) – Key inuns['moscot_results']
where the cell transition data is stored.alpha (
float
) – Transparency value in \([0, 1]\); \(0\) (transparent) and \(1\) (opaque).interpolate_color (
bool
) – Whether the color is continuously interpolated from the source to the target.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.kwargs (
Any
) – Keyword arguments forfill_between()
.
- Return type:
- Returns:
: If
return_fig = True
, returns and plots the figure. Otherwise, just plots the figure.