tgplot {praatpicture} | R Documentation |
Plot TextGrid
Description
Function for plotting TextGrids called by praatpicture. Instead of using
this function directly, just use
praatpicture('my_sound_file', frames='TextGrid')
.
Usage
tgplot(
tg,
t,
sr,
start,
tiers = 1,
tfrom0 = TRUE,
tierNames = TRUE,
alignment = "central",
specialChar = FALSE,
color = "black"
)
Arguments
tg |
TextGrid object loaded using rPraat::tg.read |
t |
Numeric vector giving times corresponding to the signal. |
sr |
Integer giving the sampling rate of the signal. |
start |
Start time (in seconds) of desired plotted area. |
tiers |
Vector of number or strings giving either numeric identifiers
of TextGrid tiers to plot or the names of TextGrid tiers to plot. Default is
|
tfrom0 |
Logical; should time on the x-axis run from 0 or from the
original time? Default is |
tierNames |
Logical; should TextGrid tier names be printed along the
y-axis? Default is |
alignment |
String giving the desired alignment of text in the
TextGrids. Default is |
specialChar |
Logical; should Praat typesetting for special font types
such as italic, bold, and small caps be converted into corresponding
R-readable special font types. Default is |
color |
String or vector of strings giving the name of the color(s)
to be used for the text in TextGrids. 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='TextGrid')