Draws a plot of a given inzightts
(inz_ts
) object with the trend
superimposed.
# S3 method for inz_ts
plot(
x,
var = NULL,
xlab = NULL,
ylab = NULL,
title = NULL,
xlim = NULL,
aspect = NULL,
compare = TRUE,
pal = NULL,
smoother = TRUE,
sm_model = "stl",
t = 0,
mult_fit = FALSE,
emphasise = NULL,
non_emph_opacity = 0.2,
show_iso_obs = TRUE,
iso_obs_size = 1,
...
)
An inzightts
(inz_ts
) object representing the time series.
A character vector specifying the variable(s) to be plotted,
or set to NULL
.
A title for the x-axis of the plot.
A title for the y-axis of the plot.
A title for the graph.
Axis limits, specified as dates or years.
The aspect ratio of the plot; it will be about aspect
times
wider than it is high.
Logical; set to TRUE
to plot the key levels in a single
plot.
(Only if a categorical variable is passed to var
): The colour
palette for the categorical plot. The palette vector should be in
the same order per the rows of tsibble::key_data(x)
.
Logical; if TRUE
, the smoother will be drawn.
The smoothing method to be used.
The smoothing parameter (between 0 and 100).
Logical; set to TRUE
for a multiplicative model, or
FALSE
for the default additive model.
Integer vector to specify the key level(s) to focus in the
plot. The integer maps to the specific key level(s)
corresponding to the ith row of tsibble::key_data(x)
.
Numeric. If (0, 1]
, this argument determines the
opacity of the series other than the focused one(s)
(to highlight the focused series). If
non_emph_opacity = 0
, the plot draws the focused
series in its own scales.
Logical; set to TRUE
to plot isolated observations
between time series gaps (if any).
Numeric; scaling the size of isolated observations,
if show_iso_obs = TRUE
and they exist.
Additional arguments (ignored).
A time series plot (constructed with ggplot2) is returned, which can be added to if desired.