The following is a description of some of the plotting functions which have been specifically written in Emu for analysing speech data. All of these plots are built on S-plus graphical primitives. See e.g. the S-plus plotting functions plot, barplot, hist.
The Emu function hplot can be used to plot histograms of a single acoustic parameter for multiple types of segments. It takes two obligatory arguments: a vector of values, and a parallel label vector to relate the vector to different labels.
In this example, a histogram is plotted of the F2 values at the segment midpoint of [i:] (e.g. heed) [o:] (hoard) and [A] (had) vowels from the database.
segs _ emu.query("demo", "*", "Phonetic=i:|o:|A")
vals _ emu.track(segs, "fm", cut=0.5)
hplot(vals[,2], label(segs), xlab="F2 Frequency (Hz)")
|
The function nplot can be used to fit a normal curve to single parameter data. Like hplot, it takes two required arguments: a vector of parameter values, and a parallel label file.
This example uses the same data as in the nplot example above:
nplot(vals[,2], l.segs, xlab="F2 Frequency (Hz)")
|
Figure 12-1 shows the results of these two examples.
Note that if the second argument, the parallel vector of labels, is omitted, then nplot assumed all tokens to belong to a single class, and one normal curve for all tokens is plotted.