pyeeg.vizu.significance_overlay

pyeeg.vizu.significance_overlay(pval, edges, height=None, color='k', yerr=None, dh=0.05, barh=0.05, fontsize=None, maxasterix=None, ax=None)

Annotate barplot (preferably, but any type really) with p-values.

Parameters:
  • pval (str or float) – String to write or p-value for generating asterixes.

  • edges (list of float) – Data edges of the bar.

  • height (float, optional) – Height of the significance bar. If None (default), the current y-limit of the axis is used.

  • color (str or tuple) – Color of the significance bracket and text. Defaults to 'k'.

  • yerr (list of float, optional) – Error bars of all bars, added to the height of the bracket extremities.

  • dh (float) – Height offset over bar / bar + yerr in axes coordinates (0 to 1). Defaults to 0.05.

  • barh (float) – Bar height in axes coordinates (0 to 1). Defaults to 0.05.

  • fontsize (int, optional) – Font size of the annotation text.

  • maxasterix (int, optional) – Maximum number of asterixes to write (for very small p-values).

  • ax (matplotlib.axes.Axes, optional) – Axis on which to annotate. If None (default), the current axes are used.

Returns:

ax – Axis used.

Return type:

plt.Axes