% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotSeries.R
\name{plot_series}
\alias{plot_series}
\title{Plot the observation series along with many other customizable options.}
\usage{
plot_series(fit, r = NULL, features = NULL,
  stateProbability = "smoothed", stateProbabilityFunction = median,
  chain = 1, main = NULL, xlab = NULL, ylab = NULL,
  addLegend = TRUE, legend.cex = 1, ...)
}
\arguments{
\item{fit}{An object returned by either \code{\link{draw_samples}} or \code{\link{optimizing}}.}

\item{r}{An optional numeric vector with the numbers of the dimensions of the observation vector to be plotted. It defaults to plotting all variables.}

\item{features}{An optional vector of character strings with the names of the features to include in the plot. These may be \emph{stateShade} (shaded background), \emph{yColoredLine} (colored observation line), \emph{yColoredDots} (colored observation dots), \emph{bottomColoredMarks} (colored marks on the lower axis), \emph{topColoredMarks} (colored marks on the top axis). All colors are based on the hidden state assigned to each time step using the \emph{stateProbability} quantity. Note that more than one feature may be plotted at the same time. It allows for partial matching. It defaults to none.}

\item{stateProbability}{An optional character string with the name of the quantity used to classify the observations (either filtered, smoothed, or viterbi). It allows for partial matching. It defaults to the smoothed probability.}

\item{stateProbabilityFunction}{An optional function applied to the samples corresponding to one time step \emph{t}, one hidden state \emph{k}. The observation at time step \emph{t} is then assigned to the hidden state with largest value. Note that the user needs to supply a function as an argument, and not a character string with the name of the function. It defaults to the \code{\link{median}} function.}

\item{chain}{An optional integer number between 1 and the number of chains M. Only the samples generated by the selected chain are considered. It defaults to the first chain.}

\item{main}{An optional character string with the overall title for the plot.}

\item{xlab}{An optional character string with the title for the horizontal axis.}

\item{ylab}{An optional character string with the title for the vertical axis.}

\item{addLegend}{An optional boolean indicating whether a legend should be included.}

\item{legend.cex}{A numerical value giving the amount by which plotting legend text and symbols should be magnified relative to the default. It defaults to one.}

\item{...}{Arguments to be passed to the \code{\link{plot}} function.}
}
\description{
Plot the observation series along with many other customizable options.
}
\examples{
\dontrun{
plot_series(
  myFit,
  features = c("stateShade", "yColoredLine", "bottomColoredMarks")
)
}
}
\seealso{
Other visualization functions: \code{\link{get_current_theme}},
  \code{\link{get_default_theme}},
  \code{\link{modify_theme_entry}},
  \code{\link{plot_ppredictive}},
  \code{\link{plot_state_probability}}, \code{\link{theme}}
}
\concept{visualization functions}
