plot.TLSW  R Documentation 
TLSW
ObjectPlots information contained within a TLSW
object.
Depending on the plot.type
option this will produce a plot of the data
with trend estimate overlayed, a plot of the spectral estimate, or both (default).
If the TLSW
object does not contain trend or spectral estimates and these are requested
a warning will be given.
## S3 method for class 'TLSW'
plot(
x,
plot.type = c("trend", "spec"),
trend.plot.args,
spec.plot.args,
plot.CI = TRUE,
...
)
x 
A 
plot.type 
A string object indicating what is to be plotted. Can be:

trend.plot.args 
A list object, that includes any choices for the graphical parameters used for plotting the trend estimate. 
spec.plot.args 
A list object, that includes any choices for the graphical parameters used for plotting the spectral estimate. 
plot.CI 
A logical variable. If TRUE, the confidence interval of the trend estimate (if computed) will be included in the plot. 
... 
Any additional arguments that will be applied to the graphical parameters of both the trend and spectrum plotting. 
A TLSW object can be plotted using the standard plot
function in R to display the
estimated trend function and wavelet spectrum. The estimated trend is visualised using
plot.default
. Visualisation of the estimated spectrum is
based on plot.wd
, for which credit belongs to Guy Nason.
Graphical parameters for customising the display of the trend or spectrum plots should be given
to the trend.plot.args
and spec.plot.args
arguments respectively.
For graphical parameters for the trend plot:
Parameters related to the overall plot should be provided as they usually would be when using the plot
function,
in the trend.plot.args
list object. For example, to change the title of the plot to "Plot", use main = "Plot"
.
Parameters affecting the display of the estimated trend line should begin with the
prefix "T."
. For example, to set the colour of the trend line to blue, use
T.col = "blue"
.
Parameters affecting the display of the confidence interval lines should begin with the
prefix "CI."
. For example, to set the line width of the confidence interval to 2, use
CI.lwd = 2
.
Parameters affecting the display of the polygon drawn by the confidence interval
should begin with the prefix "poly."
. For example, to set the colour of the
confidence interval region to green, use poly.col = "green"
.
No return value, called for side effects
McGonigle, E. T., Killick, R., and Nunes, M. (2022). Modelling timevarying first and secondorder structure of time series via wavelets and differencing. Electronic Journal of Statistics, 6(2), 43984448.
McGonigle, E. T., Killick, R., and Nunes, M. (2022). Trend locally stationary wavelet processes. Journal of Time Series Analysis, 43(6), 895917.
TLSW
, summary.TLSW
, print.TLSW
, plot.wd
# Simulates an example time series and estimates its trend and evolutionary wavelet spectrum.
# Then plots both estimates.
spec < matrix(0, nrow = 9, ncol = 512)
spec[1, ] < 4 + 4 * sin(seq(from = 0, to = 2 * pi, length = 512))^2
trend < seq(from = 0, to = 10, length = 512) + 2 * sin(seq(from = 0, to = 2 * pi, length = 512))
set.seed(1)
x < TLSWsim(trend = trend, spec = spec)
x.TLSW < TLSW(x)
plot(x.TLSW, trend.plot.args = list(
ylab = "Simulated Data", T.col = 4,
T.lwd = 2, T.lty = 2
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.