Plotting segment data: Multiple plots

This function is used to make a plot of several different segments with one segment per display. Plots can be made on any parameter which is returned by tracks. The two obligatory arguments are a segment list and the parameter on which a plot is to be made.

The following instructions can be used to plot the first two formant frequencies for the first 12 [i:] segments in the database, with one panel per segment. Here we also label each graph with the phonetic element preceeding the [i:], these labels are obtained using the label function ( ).

segs.i <- emu.track("demo", "*", "Phonetic=i:") 
pre.labs <- emu.requery(segs.i, "Phonetic", sequence=-1)
segplot(segs.i[1:12,], "fm", labels=pre.labs) 

Figure 11.4. A segment plot of the second formant for 12 [i:] segments, each plot is labelled with the phonetic element that preceeds the [i:].

A segment plot of the second formant for 12 [i:] segments, each plot is labelled with the phonetic element that preceeds the [i:].

Multiple formant frequencies can be plotted simultaneously. Additionally, the arguments onset and offset can be used to include an additional section of the speech signal to the left or right of the display. The following instructions plot F1 and F2 for the same vowels, and include 50 ms of the signal at the vowel onset, and 30 ms at the vowel offset:

segplot(segs.i[1:12,], "fm[1:2]", onset=50, offset=30) 

The argument addlines draws vertical lines at specified time points. Specifically, if addlines is a vector of time values, then a vertical line is drawn on plot j at the time given in addlines[j]. If addlines is a matrix, then a series of vertical lines are drawn on plot j, for the times given in addlines[j,i] (i=1, 2, 3\ldots). For example, segplot can be used to mark the boundaries corresponding to the steady-state interval of vowels. First, formant data is extracted for the same segments as above. Then the steady function is used to calculate which (25%) section of each segment has the shortest inter-euclidean distance between data points (in an F1-F2-F3 space in this case since we use the first three columns of fvals):

fvals <- track(segs.i, "fm")
svals <- steady(fvals[,1:3])

The boundary times of the steady-state intervals are given by svals$stime (a 2-columned matrix). These boundary times can be plotted on F1-F3 displays for each segment by passing this matrix to the addlines argument of segplot, thus:

> segplot(segs.i, "fm[1:3]", addlines=svals$stime)