scirpy.pl.base.bar

Contents

scirpy.pl.base.bar#

scirpy.pl.base.bar(data, *, ax=None, stacked=True, style='default', style_kws=None, fig_kws=None, **kwargs)#

Basic plotting function built on top of bar plot in Pandas.

Draws bars without stdev.

Parameters:
  • data (DataFrame) – Data to plot in wide-format (i.e. each row becomes a bar)

  • ax (Optional[Axes] (default: None)) – Plot into this axes object

  • stacked (bool (default: True)) – Determines if the vars should be stacked.

  • style (Optional[Literal['default']] (default: 'default')) – Style to apply to the axes. Currently supported are None (disable styling) and default (default style).

  • style_kws (Optional[dict] (default: None)) – Parameters passed to scirpy.pl.styling.style_axes()

  • fig_kws (Optional[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