Learn R Programming

lomb (version 1.2)

plot.lsp: Plot Lomb-Scargle Periodogram

Description

Plots the normalised power as a function of frequency (or period, depending on type in function lsp).

Usage

# S3 method for lsp
plot(x, type = "l", main = "Lomb-Scargle Periodogram", xlab = NULL,
    ylab = "normalised power", level = TRUE, log = NULL, ...)

Arguments

x

Object of class lsp as returned from function lsp.

type

Character indicating the type of plotting. Any of the types as in plot.default.

main

Character. Main title of the periodogram plot. Defaults to “Lomb-Sargle Periodogram”.

xlab

Character. X-axis label of the periodogram plot.

ylab

Character. Y-axis label of the periodogram plot.

level

Logical. If TRUE, the siginificance level is displayed as a dashed line.

log

By default, periodgrams of type=“period” are shown with a log x-axis. If desired otherwise, use log=“..” to define log-axis as in plot.default

Additional graphics parameters

Value

Invisibly returns the object of class lsp it is called with.

Details

Usually, this function is only called by function lsp. It maybe called by the user for some control of the ouput. For better control, plot results from lsp ($scanned, $power) as desired.

See Also

lsp

Examples

Run this code
# NOT RUN {
data(ibex)
ibex.spec <- lsp(ibex[,2:3],type='period',from=12,to=36,ofac=10, plot=FALSE)
op <- par(pch=16)
plot.lsp(ibex.spec, main="Periodogram of daily rhythms of Tb in Capra ibex",
    cex.lab=1.3,log="", type="b",level=FALSE,xaxt="n")
axis(side=1,at=seq(12,36,by=6))
par(op)
# }

Run the code above in your browser using DataLab