Learn R Programming

phonR (version 0.4-2)

plotVowels: Plot F1 and F2 values from separate vectors or from a data frame

Description

Generates high-quality plots of provided formant values using either the default onscreen device (X11, Quartz, or Win32) or direct-to-file using R base graphics functions (PDF, SVG, JPG, PNG, TIFF, or BMP). Can also normalize values on-the-fly before plotting, through a call to normalizeVowels.

Usage

plotVowels(data=NULL, vowel=NULL, f1=NULL, f2=NULL, f3=NULL, f0=NULL, 
	grouping.factor=NULL, norm.method='none', match.unit=TRUE, 
	match.axes='absolute', points='text', means='text', points.label='auto',
	points.alpha=0.5, means.alpha=1, points.cex=0.6, means.cex=1.2, 
	ignore.hidden=TRUE, ellipses=TRUE, ellipse.alpha=0.3173, polygon=TRUE, 
	poly.order=NULL, single.plot=TRUE, titles='auto', axis.titles='auto', 
	axis.cex=0.8, garnish.col='#666666FF', grayscale=FALSE, colors=NULL, 
	shapes=NULL, lines=NULL, vary.colors=!grayscale, vary.shapes=grayscale, 
	vary.lines=grayscale, legend=single.plot, output='screen', family='',
	pointsize=12, units='in', width=6.5, height=6.5, res=72, asp=NULL,
	point.arrows=TRUE, mean.arrows=TRUE, arrowhead.length=0.05, 
	arrowhead.angle=30, point.arrow.width=1, mean.arrow.width=1.5)

Arguments

References

McCloy, D. R. 2012 Normalizing and plotting vowels with the phonR package. Technical Reports of the UW Linguistic Phonetics Laboratory. http://depts.washington.edu/phonlab/pubs/McCloy2012_phonR.pdf

See Also

normalizeVowels

Examples

Run this code
data(indoVowelData)
	plotVowels(vowel=indo$vowel, f1=indo$f1, f2=indo$f2, grouping.factor=
	           indo$gender, norm.method='bark', match.unit=FALSE, 
			   poly.order=c('i','e','a','o','u'), grayscale=TRUE)
	plotVowels(data=indo, grouping.factor='subj', single.plot=FALSE, 
	           match.axes='relative', points='none', means.cex=1.5,
			   poly.order=c('i','e','a','o','u'))
	# simulate some diphthongs
	indo$f1b <- indo$f1+sample(c(-30:-5,5:30), length(indo$f1), replace=TRUE)
	indo$f2b <- indo$f2+sample(c(-30:-5,5:30), length(indo$f1), replace=TRUE)
	plotVowels(vowel=indo$vowel, f1=cbind(indo$f1,indo$f1b), 
	           f2=cbind(indo$f2,indo$f2b), grouping.factor=indo$subj, 
	           ellipses=FALSE, polygon=FALSE)

Run the code above in your browser using DataLab