plot-Wave: Plotting Wave objects

plot-WaveR Documentation

Plotting Wave objects

Description

Plotting objects of class Wave.

Usage

## S4 method for signature 'Wave,missing'
plot(x, info = FALSE, xunit = c("time", "samples"), 
    ylim = NULL, main = NULL, sub = NULL, xlab = NULL, ylab = NULL, 
    simplify = TRUE, nr = 2500, axes = TRUE, yaxt = par("yaxt"), las = 1, 
    center = TRUE, ...)

## S4 method for signature 'WaveMC,missing'
plot(x, info = FALSE, xunit = c("time", "samples"), 
    ylim = NULL, main = NULL, sub = NULL, xlab = NULL, ylab = colnames(x), 
    simplify = TRUE, nr = 2500, axes = TRUE, yaxt = par("yaxt"), las = 1, 
    center = TRUE, mfrow = NULL, ...)
    
plot_Wave_channel(x, xunit, ylim, xlab, ylab, main, nr, simplify, axes = TRUE, 
    yaxt = par("yaxt"), las = 1, center = TRUE, ...)

Arguments

x

Object of class Wave or WaveMC, respectively.

info

Logical, whether to include (written) information on the Wave or WaveMC object within the plot.

xunit

Character indicating which units are used for setting up user coordinates (see par) and x-axis labeling. If xunit = "time", the unit is time in seconds, otherwise the number of samples.

ylim

The y (amplitude) limits of the plot.

main, sub

A title / subtitle for the plot.

xlab

Label for x-axis.

ylab

Label for y-axis (on the right side of the plot). For WaveMC objects, this can be the default colnames(x) (i.e. channel names of the WaveMC object), NULL for “channel 1”, ..., “channel nc” where nc is ncol(x), NA for no labels, or a character vector of labels (one element for each channel). For Wave objects, this can be de default “left channel” (for mono) or “left channel” and “right channel” (for stereo), NA for no labels, or a character vector of labels (one element for each channel).

simplify

Logical, whether the plot should be “simplified”. If TRUE (default), not all (thousand/millions/billions) of points (samples) of the Wave or WaveMC object are drawn, but the nr (see below) ranges (in form of segments) within nr windows of the time series.

Plotting with simplify = FALSE may take several minutes (depending on the number of samples in the Wave or WaveMC) and output in any vector format may be really huge.

nr

Number of windows (segments) to be used approximately (an appropriate number close to nr is selected) to simplify (see above) the plot. Only used if simplify = TRUE and the number of samples of the Wave or WaveMC object x is larger.

axes

Whether to plot axes, default is TRUE.

yaxt

How to plot the y-axis ("n" for no y-axis).

las

The style of the axis labels, default is las = 1 (always horizontal), see par for details.

center

Whether to plot with y-axes centered around 0 (or 127 if 8-bit), default is TRUE.

mfrow

A vector indicating the arrangement of the figures, see par for details.

...

Further arguments to be passed to the underlying plot functions.

Details

Function plot_Wave_channel is a helper function to plot a single channel (left for a Wave object, first channel / first column of data slot of a WaveMC object); in particular it is not intended to be called by the user directly.

Author(s)

Uwe Ligges ligges@statistik.tu-dortmund.de, Sarah Schnackenberg

See Also

Wave-class, Wave, WaveMC-class, WaveMC and tuneR


tuneR documentation built on Nov. 27, 2023, 5:11 p.m.

Related to plot-Wave in tuneR...