phaseplot {seewave}R Documentation

Phase-phase 2D or 3D plot of a time wave

Description

This function returns a 2D or 3D representation of a time wave according to its first, second and possibly third derivatives.

Usage

phaseplot(wave, f, channel = 1, dim = 3, plot = TRUE, type = "l",
xlab = "1st derivative",
ylab = "2nd derivative",
zlab = "3rd derivative", ...)

Arguments

wave

an R object.

f

sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.

channel

channel of the R object, by default left channel (1).

dim

a vector of lenght 1, the number of dimensions of the plot. Can be either 2 or 3.

plot

logical, if TRUE plots phase-phase plot (by default TRUE).

type

type of plot that should be drawn. See plot for details (by default "l" for lines).

xlab

title of the x axis.

ylab

title of the y axis.

zlab

title of the z axis.

...

other plot or plot3d graphical parameters of the package rgl.

Value

If plot is FALSE then a 2 or 3 column matrix is returned. The position of the column is related to the order of the derivative (i. e. first colum = first derivative.

Note

Phase-phase plot can be used to test non-linearity.

Author(s)

Jerome Sueur

References

For use of such plots see: Rice AN, Land BR, Bass AH (2011) - Nonlinear acoustic complexity in a fish 'two-voice' system. Proceedings of the Royal Society B, in press.

See Also

phaseplot2

Examples

## Not run: 
require(rgl)
data(tico)
phaseplot(tico)

## End(Not run)
s <- synth(d=0.05, f=44100, cf=440, out="Wave")
n <- noisew(d=0.05, f=44100, out="Wave")
par(mfrow=c(2,1))
phaseplot(s, dim=2)
phaseplot(n, dim=2)

[Package seewave version 2.1.6 Index]