The R Project SVN R

Rev

Rev 81315 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
42333 ripley 1
% File src/library/stats/man/plot.spec.Rd
68948 ripley 2
% Part of the R package, https://www.R-project.org
85835 ripley 3
% Copyright 1995-2024 R Core Team
42333 ripley 4
% Distributed under GPL 2 or later
5
 
27497 ripley 6
\name{plot.spec}
56186 murdoch 7
\alias{plot.spec}
27497 ripley 8
\alias{plot.spec.coherency}
9
\alias{plot.spec.phase}
10
\title{Plotting Spectral Densities}
11
\description{
12
  Plotting method for objects of class \code{"spec"}.  For multivariate
13
  time series it plots the marginal spectra of the series or pairs plots
14
  of the coherency and phase of the cross-spectra.
15
}
16
\usage{
17
\method{plot}{spec}(x, add = FALSE, ci = 0.95, log = c("yes", "dB", "no"),
35065 ripley 18
     xlab = "frequency", ylab = NULL, type = "l",
61433 ripley 19
     ci.col = "blue", ci.lty = 3,
27497 ripley 20
     main = NULL, sub = NULL,
21
     plot.type = c("marginal", "coherency", "phase"),
35065 ripley 22
     \dots)
23
 
24
plot.spec.phase(x, ci = 0.95,
25
                xlab = "frequency", ylab = "phase",
26
                ylim = c(-pi, pi), type = "l",
61433 ripley 27
                main = NULL, ci.col = "blue", ci.lty = 3, \dots)
35065 ripley 28
 
29
plot.spec.coherency(x, ci = 0.95,
30
                    xlab = "frequency",
31
                    ylab = "squared coherency",
32
                    ylim = c(0, 1), type = "l",
33
                    main = NULL, ci.col = "blue", ci.lty = 3, \dots)
27497 ripley 34
}
35
\arguments{
36
  \item{x}{an object of class \code{"spec"}.}
35065 ripley 37
  \item{add}{logical.  If \code{TRUE}, add to already existing plot.
38
    Only valid for \code{plot.type = "marginal"}.
39
  }
40
  \item{ci}{coverage probability for confidence interval.  Plotting of
41
    the confidence bar/limits is omitted unless \code{ci} is strictly
27497 ripley 42
    positive.}
85835 ripley 43
  \item{log}{If \code{"dB"}, plot on log10 (decibel) scale,
27497 ripley 44
    otherwise use conventional log scale or linear scale.  Logical
45
    values are also accepted.  The default is \code{"yes"} unless
46
    \code{options(ts.S.compat = TRUE)} has been set, when it is
35065 ripley 47
    \code{"dB"}.  Only valid for \code{plot.type = "marginal"}.
48
  }
61433 ripley 49
  \item{xlab}{the x label of the plot.}
35065 ripley 50
  \item{ylab}{the y label of the plot.  If missing a suitable label will
51
    be constructed.}
27497 ripley 52
  \item{type}{the type of plot to be drawn, defaults to lines.}
35065 ripley 53
  \item{ci.col}{colour for plotting confidence bar or confidence
27497 ripley 54
    intervals for coherency and phase.}
35065 ripley 55
  \item{ci.lty}{line type for confidence intervals for coherency and
56
    phase.}
57
  \item{main}{overall title for the plot. If missing, a suitable title
58
    is constructed.}
81315 smeyer 59
  \item{sub}{a subtitle for the plot.  Only used for \code{plot.type =
35065 ripley 60
      "marginal"}.  If missing, a description of the smoothing is used.}
27497 ripley 61
  \item{plot.type}{For multivariate time series, the type of plot
62
    required.  Only the first character is needed.}
35065 ripley 63
  \item{ylim, \dots}{Graphical parameters.}
27497 ripley 64
}
65
\seealso{
66
  \code{\link{spectrum}}
67
}
68
\keyword{hplot}
69
\keyword{ts}