spiketools.plts.annotate.add_significance

spiketools.plts.annotate.add_significance(stats, sig_level=0.05, x_vals=None, ax=None)[source]

Add markers to a plot axis to indicate statistical significance.

Parameters:
statslist

Statistical results, including p-values, to use to annotate the plot. List can contain floats, or statistical results if it has a pvalue field.

sig_levelfloat, optional, default: 0.05

Threshold level to consider a result significant.

x_vals1d array, optional

Values for the x-axis, for example time values or bin numbers. If not provided, x-values are accessed from the plot.

axAxes, optional

Axis object upon which to plot.