plot.spg: plots a spectrogram image in time-frequency space

Description Usage Arguments Details Author(s) See Also Examples

View source: R/plot.spg.R

Description

this makes a large bitmap with one rectangle for each cell of the spectrogram. the colors represent amplitude.

Usage

1
2
## S3 method for class 'spg'
plot(x, pixel.colors = gray.colors(16, 1, 0), ...)

Arguments

x

a spectrogram object

pixel.colors

a vector of colors for different amplitudes

...

other arguments for image

Details

the image function makes VERY large PDFs because each pixel is stored as a rectangle. if you are going to output with this function for publication, use a bitmap format first and mash them up in a graphics editor.

Author(s)

Benjamin N. Taft ben.taft@landmarkacoustics.com

See Also

spectrogram image

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x, pixel.colors = gray.colors(16, 1, 0), ...) 
{
    image(attr(x, "time"), attr(x, "frequency"), x, col = pixel.colors, 
        xlab = "Time (s)", ylab = "Frequency (Hz)", ...)
  }

landmarkacoustics/SoundPoints-R documentation built on May 29, 2019, 9:14 a.m.