Santiago Barreda
Postdoctoral Researcher, Dept. of Physiology, University of Arizona

Main Research Vignettes CV phonTools Statistics Links


spectrogram [phonTools]

spectrogram may be used to create very nice looking colour (or greyscale) spectrograms in R. The user is given control over every parameter involved in the creation of the spectrogram. In all of the following examples, spectrograms have been created from a recording of myself saying "this is a spectrogram".

In the first example below, the default colour scale has been used, which is based on the 'jet' scale in MATLAB. The second example features the 'alternate' color setting, while the third example is a greyscale spectrogram.




Code used to generate examples:

library (phonTools) data (sound) ## use the example 'sound' object provided # sound = loadsound() ## or run this line to use you own sound par (mfrow = c(3,1), mar = c(4,4,1,1)) spectrogram (sound) spectrogram (sound, color = 'alternate') spectrogram (sound, color = FALSE)