vak.plot.annot.annotation#
- vak.plot.annot.annotation(annot, t, tlim=None, y_segments=0.5, y_labels=0.6, line_kwargs=None, text_kwargs=None, ax=None)[source]#
plot segments with labels, from annotation
- Parameters:
annot (crowsetta.Annotation) – annotation that has segments to be plotted (the annot.seq.segments attribute)
t (numpy.ndarray) – vector of centers of time bins from spectrogram
tlim (tuple, list) – limits of time axis (tmin, tmax) (i.e., x-axis). Default is None, in which case entire range of t will be plotted.
y_segments (float) – height at which segments should be plotted. Default is 0.5 (assumes y-limits of 0 and 1).
y_labels (float) – height at which labels should be plotted. Default is 0.6 (assumes y-limits of 0 and 1).
line_kwargs (dict) – keyword arguments for LineCollection. Passed to the function vak.plot.annot.segments that plots segments as a LineCollection instance. Default is None.
text_kwargs (dict) – keyword arguments for matplotlib.axes.Axes.text. Passed to the function vak.plot.annot.labels that plots labels using Axes.text method. Default is None.
ax (matplotlib.axes.Axes) – axes on which to plot segments. Default is None, in which case a new figure with a single axes is created