spiketools.plts.annotate.add_text_labels

spiketools.plts.annotate.add_text_labels(texts, location='start', axis='x', offset=None, values=None, colors='black', ax=None, **plt_kwargs)[source]

Add text to the side of a plot.

Parameters:
textslist of str

Text(s) to add to the plot.

location{‘start’, ‘end’} or iterable

Location to plot the text labels across the axis.

axis{‘x’, ‘y’}

Which axis to add text labels across.

offsetfloat, optional

An offset value to move the text. If not provided, default to 10% of the plot range.

valueslist of float, optional

Position values to plot the text on the axis defined in axis. If not provided, defaults to the indices of the text labels.

colorsstr or list of str, optional

Color(s) for each entry. Defaults to ‘black’.

axAxes, optional

Axis object upon which to plot.

plt_kwargs

Additional keyword arguments to pass to the plt.text call.