vocalpy.plot.annot.labels#
- vocalpy.plot.annot.labels(labels: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], t: ndarray[Any, dtype[_ScalarType_co]], t_shift_label: float = 0.01, y: float = 0.4, ax: Axes | None = None, text_kwargs: dict | None = None)[source]#
Plot labels of segments on an axis.
- Parameters:
- labelslist, numpy.ndarray
- tnumpy.ndarray
Times (in seconds) at which to plot labels
- t_shift_labelfloat
Amount (in seconds) that labels should be shifted to the left, for centering. Necessary because width of text box isn’t known until rendering.
- yfloat, int
Height on y-axis at which segments should be plotted. Default is 0.5.
- axmatplotlib.axes.Axes
Axes on which to plot segment. Default is None, in which case a new Axes instance is created.
- text_kwargsdict
Keyword arguments passed to the Axes.text method that plots the labels. Default is None.
- Returns:
- text_listlist
of text objections, the matplotlib.Text instances for each label