decoupler.pl.order

Contents

decoupler.pl.order#

decoupler.pl.order(df, mode='line', kw_order=None, **kwargs)#

Plot features along a continuous, ordered process such as pseudotime.

Parameters:
  • df (DataFrame) – Results of decoupler.pp.bin_order.

  • mode (str (default: 'line')) – The type of plot to use, either “line” or “mat”.

  • kw_order (dict | None (default: None)) – Other keyword arguments are passed down to seaborn.lineplot or matplotlib.pyplot.imshow, depending on mode used.

  • ax – An existing matplotlib.axes._axes.Axes instance to plot on. If None, a new figure and axes will be created.

  • figsize – Size of the figure in inches as (width, height).

  • dpi – Dots per inch for the figure resolution.

  • return_fig – If True, plotting methods should return the figure object instead of showing it.

  • save – If set, path to save the plot automatically to a file.

Return type:

None | Figure

Returns:

If return_fig=True, returns matplotlib.figure.Figure instance.

Example

import decoupler as dc

adata, net = dc.ds.toy(pstime=True)
bins = dc.pp.bin_order(adata=adata, order="pstime", label="group", names=["G01", "G02", "G03"])
dc.pl.order(df=bins)