https://github.com/cran/forecast
Revision 2d35898db2f87accb4ebb0ed9a7d82ce0611fbcd authored by Rob Hyndman on 25 July 2022, 13:10:07 UTC, committed by cran-robot on 25 July 2022, 13:10:07 UTC
1 parent 6a00e27
Raw File
Tip revision: 2d35898db2f87accb4ebb0ed9a7d82ce0611fbcd authored by Rob Hyndman on 25 July 2022, 13:10:07 UTC
version 8.17.0
Tip revision: 2d35898
seasonplot.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot.R, R/graph.R
\name{ggseasonplot}
\alias{ggseasonplot}
\alias{seasonplot}
\title{Seasonal plot}
\usage{
ggseasonplot(
  x,
  season.labels = NULL,
  year.labels = FALSE,
  year.labels.left = FALSE,
  type = NULL,
  col = NULL,
  continuous = FALSE,
  polar = FALSE,
  labelgap = 0.04,
  ...
)

seasonplot(
  x,
  s,
  season.labels = NULL,
  year.labels = FALSE,
  year.labels.left = FALSE,
  type = "o",
  main,
  xlab = NULL,
  ylab = "",
  col = 1,
  labelgap = 0.1,
  ...
)
}
\arguments{
\item{x}{a numeric vector or time series of class \code{ts}.}

\item{season.labels}{Labels for each season in the "year"}

\item{year.labels}{Logical flag indicating whether labels for each year of
data should be plotted on the right.}

\item{year.labels.left}{Logical flag indicating whether labels for each year
of data should be plotted on the left.}

\item{type}{plot type (as for \code{\link[graphics]{plot}}). Not yet
supported for ggseasonplot.}

\item{col}{Colour}

\item{continuous}{Should the colour scheme for years be continuous or
discrete?}

\item{polar}{Plot the graph on seasonal coordinates}

\item{labelgap}{Distance between year labels and plotted lines}

\item{\dots}{additional arguments to \code{\link[graphics]{plot}}.}

\item{s}{seasonal frequency of x}

\item{main}{Main title.}

\item{xlab}{X-axis label.}

\item{ylab}{Y-axis label.}
}
\value{
None.
}
\description{
Plots a seasonal plot as described in Hyndman and Athanasopoulos (2014,
chapter 2). This is like a time plot except that the data are plotted
against the seasons in separate years.
}
\examples{
ggseasonplot(AirPassengers, col=rainbow(12), year.labels=TRUE)
ggseasonplot(AirPassengers, year.labels=TRUE, continuous=TRUE)

seasonplot(AirPassengers, col=rainbow(12), year.labels=TRUE)

}
\references{
Hyndman and Athanasopoulos (2018) \emph{Forecasting: principles
and practice}, 2nd edition, OTexts: Melbourne, Australia.
\url{https://otexts.com/fpp2/}
}
\seealso{
\code{\link[stats]{monthplot}}
}
\author{
Rob J Hyndman & Mitchell O'Hara-Wild
}
\keyword{ts}
back to top