decoupler.bm.pl.bar

Contents

decoupler.bm.pl.bar#

decoupler.bm.pl.bar(df, x, y, hue=None, palette='tab20', **kwargs)#

Plot the harmonic mean between two metric statistics as a barplot.

x-axis represent the harmonic mean between metric statistics.

y-axis represent a grouping variable.

Parameters:
  • df (DataFrame) – Result of decoupler.bm.benchmark.

  • x (str) – Continous variable to plot on x axis.

  • y (str) – Grouping variable to plot on y axis.

  • hue (str | None (default: None)) – Grouping variable that will produce different colors.

  • palette (str (default: 'tab20')) – Method for choosing the colors to use

  • 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.