scirpy.pl.base.curve

scirpy.pl.base.curve(data, *, ax=None, curve_layout='overlay', shade=True, kde_norm=True, order=None, kernel_kws=None, color=None, style='default', style_kws=None, fig_kws=None, **kwargs)

Basic plotting function for drawing KDE-smoothed curves.

Primarily designed for the scirpy.pl.spectratype() plotting function.

Parameters
data : dict

Weighted counts for KDE.

ax : Axes | NoneOptional[Axes] (default: None)

Custom axis if needed.

curve_layout : {‘overlay’, ‘stacked’, ‘shifetd’}Literal[‘overlay’, ‘stacked’, ‘shifetd’] (default: 'overlay')

if the KDE-based curves should be stacked or shifted vetrically.

kde_norm : bool (default: True)

KDE curves are by default normalized to a sum of 1. Set to False in order to keep normalized cell weights.

kernel_kws : dict | NoneOptional[dict] (default: None)

Parameters that should be passed to KernelDensity function of sklearn.

order : list | NoneOptional[list] (default: None)

Specifies the order of groups.

shade : bool (default: True)

If True, draw a shade between curves

color : Sequence[str] | NoneOptional[Sequence[str]] (default: None)

List of colors for each curve

style : {‘default’} | NoneOptional[Literal[‘default’]] (default: 'default')

Style to apply to the axes. Currently supported are None (disable styling) and default (default style).

style_kws : dict | NoneOptional[dict] (default: None)

Parameters passed to scirpy.pl.styling.style_axes()

fig_kws : dict | NoneOptional[dict] (default: None)

Parameters passed to the matplotlib.pyplot.figure() call if no ax is specified. Defaults to {'figsize': (3.44, 2.58), 'dpi': 120} if None.

Return type

Axes

Returns

Axes object.