| plot.tsoutliers {tsoutliers} | R Documentation |
Display Outlier Effects Detected by tsoutliers
Description
This function displays the output from function tso.
Usage
## 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),
...)
Arguments
x |
a list of class |
args.lines.y |
a list. Arguments passed to |
args.lines.yadj |
a list. Arguments passed to |
args.lines.effects |
a list. Arguments passed to |
args.points |
a list. Arguments passed to |
plot.points |
a logical indicating whether the time points of the outliers should be drawn as points over the original series. |
args.x.axis |
a list. Arguments to be passed to |
args.y.axis |
a list. Arguments to be passed to |
args.effects.axis |
a list. Arguments to be passed to |
... |
further arguments to be passed to |
Details
Instead of using the ellipsis, ..., 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.
Value
None.
See Also
tso.