| wf {seewave} | R Documentation | 
Waterfall display
Description
This function returns a waterfall display of a short-term Fourier transform or of any matrix.
Usage
wf(wave, f, channel = 1, wl = 512, zp = 0, ovlp = 0, fftw= FALSE, dB = "max0",
dBref = NULL, wn = "hanning", x = NULL,
hoff = 1, voff = 1, col = heat.colors,
xlab = "Frequency (kHz)", ylab = "Amplitude (dB)",
xaxis = TRUE, yaxis = TRUE,
density = NULL, border = NULL, lines = FALSE, lwd=NULL, ...)
Arguments
| wave | an R object. | 
| f | sampling frequency of  | 
| channel | channel of the R object, by default left channel (1). | 
| wl | window length for the analysis (even number of points). (by default = 512) | 
| zp | zero-padding (even number of points), see  | 
| ovlp | overlap between two successive windows (in %). | 
| fftw | if  | 
| dB | a character string specifying the type dB to return: "max0" for a maximum dB value at 0, "A", "B", "C", "D", and "ITU" for common dB weights. | 
| dBref | a dB reference value when  | 
| wn | window name, see  | 
| x | a matrix if  | 
| hoff | horizontal 'offset' which shifts actual x-values slightly per row for visibility. Fractional parts will be removed. | 
| voff | vertical 'offset' which separates traces. | 
| col | a color or a color palette function to be used to assign colors in the plot | 
| xlab | title of the frequency x-axis. | 
| ylab | title of the amplitude y-axis. | 
| xaxis | a logical, if  | 
| yaxis | a logical, if  | 
| density | argument of  | 
| border | argument of  | 
| lines | a logical, if  | 
| lwd | line width. | 
| ... | other graphical arguments to passed to  | 
Details
Data input can be either a time wave (wave) or a matrix
(x). In that case, if xaxis is set to TRUE the
x-axis will follow the row index. To change it, turn xaxis to
FALSE and use axis afterwards. See examples.
Note
The function is well adapted to display short-term Fourier
transform. However, any matrix can be called using the argument
x instead of wave.
Author(s)
Carl G. Witthoft and Jerome Sueur sueur@mnhn.fr
See Also
Examples
data(tico)
wf(tico,f=22050)
# changing the display parameters
jet.colors <- colorRampPalette(c("blue", "green"))
wf(tico,f=22050, hoff=0, voff=2, col=jet.colors, border = NA)
# matrix input instead of a time wave and transparent lines display
m <- numeric()
for(i in seq(-pi,pi,len=40)) {m <- cbind(m,10*(sin(seq(0,2*pi,len=100)+i)))}
wf(x=m, lines=TRUE, col="#0000FF50",xlab="Time", ylab="Amplitude",
main="waterfall display")