formantplot {praatpicture} | R Documentation |
Plot formant object
Description
Function for plotting formant objects called by praatpicture. Instead of
using this function directly, just use
praatpicture('my_sound_file', frames='formant')
.
Usage
formantplot(
fm,
start,
end,
tfrom0 = TRUE,
tgbool = FALSE,
lines = NULL,
focusTierColor = "black",
focusTierLineType = "dotted",
dynamicRange = 30,
freqRange = c(0, 5500),
plotType = "speckle",
color = "black",
ind = NULL,
min_max_only = FALSE,
axisLabel = "Frequency (Hz)"
)
Arguments
fm |
Formant object loaded using rPraat::formant.read |
start |
Start time (in seconds) of desired plotted area. |
end |
End time (in seconds) of desired plotted area. |
tfrom0 |
Logical; should time on the x-axis run from 0 or from the
original time? Default is |
tgbool |
Logical; should dotted lines be plotted corresponding to
locations in a TextGrid? Default is |
lines |
Numeric vector giving locations in seconds of locations from
a TextGrid to be plotted with dotted lines. Default is |
focusTierColor |
String or vector of strings giving the color(s) to
use for plotting focus tier lines. If multiple tiers are focused, a vector
of the same length can be passed, and the nth tier will be plotted in the
nth color. Default is |
focusTierLineType |
String or vector of strings giving the line
type(s) for plotting focus tier lines. If multiple tiers are focused, a
vector of the same length can be passed, and the nth tier will be plotted in
the nth line type. Default is |
dynamicRange |
Dynamic range in dB for producing formant plots.
When a formant plot of |
freqRange |
Vector of two integers giving the frequency range to be
used for producing formant plots. Default is |
plotType |
String giving the type of formant plot to produce;
default is |
color |
String or vector of strings giving the name(s) of
colors to be used for plotting formants. If one color is provided, all
formants will be plotted in this color. If multiple colors are provided,
different formants will be shown in different colors. Default is |
ind |
Integer indexing waveform relative to other plot components.
Default is |
min_max_only |
Logical; should only minimum and maximum values be given
on the y-axis? Default is |
axisLabel |
String giving the name of the label to print along the
y-axis when plotting formants. Default is |
Value
No return values, called internally by praatpicture and sibling functions.
Examples
# Don't use directly
datapath <- system.file('extdata', package='praatpicture')
soundFile <- paste0(datapath, '/1.wav')
praatpicture(soundFile, frames='formant')