data(sheep)
# fundamental frequency of a sheep
autoc(sheep,f=8000,threshold=5,fmax=700)
# overlay on spectrogram
spectro(sheep,f=8000,ovlp=75,zp=16,scale=FALSE)
par(new=TRUE)
autoc(sheep,f=8000,wl=512,threshold=5,fmax=700,col="black",pch=20,
xaxs="i",yaxs="i",ann=FALSE,yaxt="n")
legend(0.5,3.6,"Fundamental frequency",pch=20,col="black",bty=0,cex=0.7)
Run the code above in your browser using DataLab