| plot.inz_ts {iNZightTS} | R Documentation |
Draws a plot of a given inzightts (inz_ts) object with the trend
superimposed.
## S3 method for class '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, ... )
x |
An |
var |
A character vector specifying the variable(s) to be plotted,
or set to |
xlab |
A title for the x-axis of the plot. |
ylab |
A title for the y-axis of the plot. |
title |
A title for the graph. |
xlim |
Axis limits, specified as dates or years. |
aspect |
The aspect ratio of the plot; it will be about |
compare |
Logical; set to |
pal |
(Only if a categorical variable is passed to |
smoother |
Logical; if |
sm_model |
The smoothing method to be used. |
t |
The smoothing parameter (between 0 and 100). |
mult_fit |
Logical; set to |
emphasise |
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 |
non_emph_opacity |
Numeric. If |
show_iso_obs |
Logical; set to |
iso_obs_size |
Numeric; scaling the size of isolated observations,
if |
... |
Additional arguments (ignored). |
A time series plot (constructed with ggplot2) is returned, which can be added to if desired.
t <- inzightts(visitorsQ, var = c(2, 4)) ## Not run: plot(t) plot(t, var = names(t)[-1]) plot(t, var = "Japan") plot(t, mult_fit = TRUE) ## End(Not run)