# classVowelCharts.R # Set the working directory to where you have stored the data files. setwd("c:/Lx286") # Read in the table files that you want to plot. Joe=read.table("Joe.Table",header=T,as.is=T) Chanelle=read.table("Chanelle.Table",header=T,as.is=T) # Use the min() and max() commands to figure out what the ranges # for the x-axis and y-axis should be, like this: min(Chanelle$F2) # [1] 1114 max(Chanelle$F2) # [1] 2908.8 min(Joe$F2) # [1] 1039 max(Joe$F2) # [1] 2242 max(Joe$F1) # [1] 753 max(Chanelle$F1) # [1] 989.1 min(Chanelle$F1) # [1] 381 min(Joe$F1) # We used the values above to determine what numbers to plug into # the xlim and ylim arguments in the plot command, like this: plot(Chanelle$F2, Chanelle$F1, xlim=c(3000,1000), ylim=c(1000,250), xlab="second formant (Hz)", ylab="first formant (Hz)", col="purple", pch=19, type="n") # Jillian wanted to have the words instead of the vowels for the plot. text(Chanelle$F2, Chanelle$F1, Chanelle$word, col="purple") # Use this next line if you prefer to plot the vowels. # text(Chanelle$F2, Chanelle$F1, Chanelle$vowel, col="purple") # This command overlays Joe's formant values on Chanelle's formant # values. # points(Joe$F2, Joe$F1, col="salmon3", pch=19) text(Joe$F2, Joe$F1, Joe$word, col="salmon3") # text(Joe$F2, Joe$F1, Joe$vowel, col="salmon3")