descriptive-plots | R Documentation |
Plots for describing time series data.
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, ...)
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) |
... |
Extra arguments passed to |
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.
Returns invisible{NULL}
.
monthplot
is a base R function for plotting time
series of type ts
.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.