| plot.phontrast_contrast | R Documentation |
phontrast() results carry the class "phontrast_contrast", so
they can be plotted without an explicit call to
plot_overlap_metrics(): plot(phontrast(...)) draws the metric
comparison, and ggplot2::autoplot(phontrast(...)) returns the same
plot unprinted for further composition.
## S3 method for class 'phontrast_contrast'
plot(x, ...)
## S3 method for class 'phontrast_contrast'
autoplot(object, ...)
x, object |
A |
... |
Passed on to |
plot() draws the plot and returns it invisibly;
autoplot() returns the ggplot2 object unprinted.
set.seed(2026)
vowels <- data.frame(
vowel = rep(c("ih", "eh"), each = 40),
f1 = c(rnorm(40, 500, 55), rnorm(40, 565, 60)),
f2 = c(rnorm(40, 1980, 150), rnorm(40, 1870, 155))
)
if (requireNamespace("ggplot2", quietly = TRUE)) {
plot(phontrast(vowels, c("f1", "f2"), "vowel", output = "long"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.