Description Usage Arguments References Examples
Transforms the axes of a ggplot into the bark scale. The data is still plotted in Hz. If you want to plot the data in Barks themselves, transform the data beforehand and plot normally. For an example of plots using this scale, see Harrington et al. (2000).
1 2 3 | scale_x_bark(..., rev = TRUE)
scale_y_bark(..., rev = TRUE)
|
... |
Parameters passed on to |
rev |
Should the axis be flipped? Or rather, would you normally use
|
Harrington, Jonathan, Sallyanne Palethorpe, and Catherine Watson. "Monophthongal Vowel Changes in Received Pronunciation: An Acoustic Analysis of the Queen’s Christmas Broadcasts." Journal of the International Phonetic Association 30, no. 1–2 (2000): 63–78. https://doi.org/10.1017/S0025100300006666
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(ggplot2)
# You can use this function wherever you'd use `scale_x_reverse` or
# `scale_y_reverse`. Here is a simple F1-F2 plot:
data(vowels)
ggplot(vowels, aes(F2, F1, color = vowel)) +
geom_point() +
scale_x_bark() +
scale_y_bark()
# If you want to plot a spectrogram-like plot, you only need `scale_y_bark`.
# Be sure to set `rev=TRUE` so that the axis is not reversed.
data(mouth)
ggplot(mouth, aes(percent, hz, color = formant, group = traj_id)) +
geom_path(alpha = 0.5) +
scale_y_bark(rev = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.