decoupler.plot_barplot_df

decoupler.plot_barplot_df(df, x, y, color='gray', thr=None, thr_color='black', title=None, figsize=(3, 3), dpi=100, ax=None, return_fig=False, save=None, **kwargs)

Plot results of enrichment analysis as bars.

Parameters:
dfDataFrame

Results of enrichment analysis.

xstr

Column name of df to use as continous value.

ystr

Column name of df to use as labels.

colorstr

Color to plot the bars.

thrfloat, None

If specified, x value where to draw a vertical dashed line.

thr_colorstr

Color of the vertical dashed line.

titlestr, None

Text to write as title of the plot.

figsizetuple

Figure size.

dpiint

DPI resolution of figure.

axAxes, None

A matplotlib axes object. If None returns new figure.

return_figbool

Whether to return a Figure object or not.

savestr, None

Path to where to save the plot. Infer the filetype if ending on {.pdf, .png, .svg}.

kwargsdict

Other keyword arguments are passed through to matplotlib.pyplot.barh.

Returns:
figFigure, None

If return_fig, returns Figure object.