Skip to contents

Plots the waveforms of the (non-empty) PTSamples in a PTModule object.

Usage

# S4 method for PTModule,missing
plot(x, y, plot.loop.positions = T, ...)

Arguments

x

A PTModule object for which the waveforms of the PTSamples need to be plotted.

y

missing. Argument from the generic plotting method, don't use.

plot.loop.positions

A logical value indicating whether loop positions need to be visualised. For looped samples, the starting and ending positions are marked by a vertical green and red line, respectively.

...

Arguments that are passed on to lattice::xyplot.

Value

Returns an object of class trellis. See documentation of lattice::xyplot for more details.

Details

A plotting routine based on the lattice::xyplot from the lattice-package. Plots each (non-empty) waveform in a separate panel. Use arguments of the lattice::xyplot function to customise the plot.

Author

Pepijn de Vries

Examples

## get the example PTModule provided with the ProTrackR package
data("mod.intro")

## The most basic way to plot the module samples:
plot(mod.intro)
#> Error in as.double(y): cannot coerce type 'S4' to vector of type 'double'

## By using xyplot arguments, we can make it look nicer:
plot(mod.intro, type = "l", layout = c(1,4),
     scales = list(x = list(relation = "free")))
#> Error in as.double(y): cannot coerce type 'S4' to vector of type 'double'