tsoutliers
tsoutliers
.## S3 method for class 'tsoutliers':
plot(x,
args.lines.y = list(col = "gray80"), args.lines.yadj = list(col = "blue"),
args.lines.effects = list(type = "s", col = "red"),
args.points = list(col = "gray80", bg = "red", pch = 21), plot.points = TRUE,
args.x.axis = list(at = pretty(time(x$y)), tcl = -0.5, lwd = 0, lwd.ticks = 1),
args.y.axis = list(at = pretty(x$y), tcl = -0.5, lwd = 0, lwd.ticks = 1),
args.effects.axis = list(at = pretty(x$effects), tcl = -0.5, lwd = 0, lwd.ticks = 1),
...)
tsoutliers
as returned by tsoutliers
.lines
to
customize the line displaying the original series.lines
to
customize the line displaying the series adjusted for outliers effects.lines
to
customize the line displaying the for outliers effects.lines
to
customize the points drawn if plot.points = TRUE
.axis
to customize
the x-axis (time).axis
to customize
the y-axis for the original series.axis
to customize
the y-axis for the outliers effects.par
....
, arguments passed to other functions are
defined by means of a list. This approach is taken because there may be a single
argument name to be used in different parts of the plot with a different value.
For example, the argument col
can be defined in args.lines.y
to indicate
the color of the original series, e.g. col = "gray80"
; at the same time
the color for the adjusted series can be defined in the list argument args.lines.yadj
.For further customizations, the source code of the function can be modified relatively
easy. Alternatively, a similar plot can be displayed simply as:
plot(cbind(x$y, x$yadj, x$effects), plot.type = "multiple")
.
In this way, the plot can be fully customized by setting the desired arguments to
to plot
or to ancillary functions that can be called afterwards.
tsoutliers
.