descriptive-plots {bsts} | R Documentation |
Descriptive Plots
Description
Plots for describing time series data.
Usage
DayPlot(y, colors = NULL, ylab = NULL, ...)
MonthPlot(y, seasonal.identifier = months, colors = NULL, ylab = NULL, ...)
YearPlot(y, colors = NULL, ylab = NULL, ylim = NULL, legend = TRUE, ...)
Arguments
y |
A time series to plot. Must be of class |
seasonal.identifier |
A function that takes a vector of class |
colors |
A vector of colors to use for the lines. |
legend |
Logical. If |
ylab |
Label for the vertical axis. |
ylim |
Limits for the vertical axis. (a 2-vector) |
... |
Details
DayPlot
and MonthPlot
plot the time series one season at
a time, on the same set of axes. The intent is to use DayPlot for
daily data and MonthPlot for monthly or quarterly data.
YearPlot
plots each year of the time series as a separate line
on the same set of axes.
Both sets of plots help visualize seasonal patterns.
Value
Returns invisible{NULL}
.
See Also
monthplot
is a base R function for plotting time
series of type ts
.
Examples
## Plot a 'ts' time series.
data(AirPassengers)
par(mfrow = c(1,2))
MonthPlot(AirPassengers)
YearPlot(AirPassengers)
## Plot a 'zoo' time series.
data(turkish)
par(mfrow = c(1,2))
YearPlot(turkish)
DayPlot(turkish)