% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PM_cycle.R
\name{plot.PM_cycle}
\alias{plot.PM_cycle}
\title{Plot Cycle Information}
\usage{
\method{plot}{PM_cycle}(
  x,
  line = TRUE,
  marker = TRUE,
  colors,
  linetypes,
  omit,
  grid = TRUE,
  xlab,
  ylab,
  print = TRUE,
  ...
)
}
\arguments{
\item{x}{The name of a \link{PM_cycle}  object, e.g. \code{NPex$cycle}.}

\item{line}{Controls characteristics of lines. This argument maps to plotly line attributes. \code{TRUE} will plot default lines. \code{FALSE} will suppress lines. If a list, can control many line characteristics, including overriding defaults. Use the plotly \code{plotly::schema()} command in the console and navigate to traces > scatter > attributes > line to see all the ways the line can be formatted. Most common will be:  \itemize{ \item{\code{color}} Line color. \item{\code{dash}} Plotting character. See \code{plotly::schema()}, traces > scatter >  attributes > line > dash > values. \item{\code{width}} Thickness in points. }

Example: \code{line = list(color = "red", dash = "longdash", width = 2)}
Default = \code{list(color = "dodgerblue", width = 2, dash = "solid")}.
\strong{Note} The width will apply to all plots, but \code{color} and \code{dash} will only apply
to the first three plots (log-likelihood, AIC, gamma/lambda). Use \code{colors} and \code{linetypes}
below to control the appearance
of the line traces for the normalized plots, because each of those traces is mapped to
a parameter.}

\item{marker}{Controls the plotting symbol for observations.  This argument maps to the plotly marker object. It can be boolean or a list. \code{TRUE} will plot the marker with default characteristics. \code{FALSE} will suppress marker plotting. If a list, can control many marker characteristics, including overriding defaults. Use the plotly \code{plotly::schema()} command in the console and navigate to traces > scatter > attributes > marker to see all the ways the marker can be formatted. Most common will be: \itemize{ \item{\code{color}} Marker color. \item{\code{symbol}} Plotting character. See \code{plotly::schema()}, traces > scatter > attributes > marker > symbol > values. \item{\code{size}} Character size in points. \item{\code{opacity}} Ranging between 0 (fully transparent) to 1 (fully opaque). \item{\code{line}} A list of  additional attributes governing the outline for filled shapes, most commonly color and width. }

Example: \code{marker = list(color = "red", symbol = "triangle", opacity = 0.8, line = list(color = "black", width = 2))}
Here, the observation controlled is the value of a given
trace at a specific cycle number. Default = \code{list(symbol = "circle", color = "dodgerblue", size = 4)}.
\strong{Note} the marker color for the normalized parameter value plots will be controlled by the \code{colors}
parameter below, but size and symbol will apply to all plots.}

\item{colors}{to use for normalized parameter value line traces. This can be a palette or a vector of colors.
For accepted palette names see \code{RColorBrewer::brewer.pal.info}. Examples include
"BrBG", or "Set2". An example vector could be \code{c("red", "green", "blue")}. It is not
necessary to specify the same number of colors parameters to be plotted, as colors
will be interpolated to generate the correct number. The default when \code{color}
is not specified is the "Set2" palette.}

\item{linetypes}{to use for normalized parameter value line traces.
See \code{plotly::schema()}, traces > scatter >
attributes > line > dash > values.
An example vector could be \code{c("solid", "dash", "longdash")}. It is not
necessary to specify the same number of linetype parameters to be plotted, as they
will be recycled to generate the correct number. The default when \code{linetypes}
is not specified is "solid".}

\item{omit}{Decimal between 0 and 1 specifying the proportion of "burn-in" cycles to omit from the plots.  If missing,
the first 20\% will be omitted.}

\item{grid}{Controls grid display. This argument maps to the xaxis and yaxis layout objects in plotly.  Use the plotly \code{plotly::schema()} command in the console and navigate to layout > layoutAttributes > xaxis or yaxis > gridcolor or gridwidth. It is a Boolean operator. If \code{FALSE}, no grid is plotted.  If \code{TRUE}, the default color \emph{grey} and width 1 will be plotted at  major tick marks. If a list, color and width can be customized.

Examples: \itemize{ \item{\code{grid = F}} \item{\code{grid = list(gridcolor = "black", gridwidth = 2)}} }}

\item{xlab}{Controls the formatting of the x-axis label. The text is fixed by the function and cannot be altered.
Use the plotly \code{plotly::schema()} command in the console and navigate
to layout > layoutAttributes > xaxis > title to see the ways to customize
this axis label.
In addition to the plotly attributes, a custom Pmetrics attribute \code{bold}
may be included as a list element, either on its own or within the font
list. The default for \code{bold} is \code{TRUE}.\if{html}{\out{<br>}}
\if{html}{\out{<br>}}
Examples:
\itemize{
\item{\code{xlab = list(bold = F, font = list(color = "red", family = "Arial", size = 10))}}
\item{\code{xlab = list(font = list(bold = T))}}
}}

\item{ylab}{Format for y-axis label.
This argument maps to the the yaxis title element of the layout object in plotly.
See \code{xlab} for details. If \code{xlab} is specified as a list with formatting,
then the formatting for the
\code{xlab} will be applied to the \code{ylab}. To format \code{ylab} independently,
specify a formatting list as for \code{xlab}.}

\item{print}{If \code{TRUE}, will print the plotly object and return it. If \code{FALSE}, will only return the plotly object.}

\item{\dots}{Additional R plotting parameters.}
}
\value{
Plots a panel with the following windows: -2 times the log-likelihood at each cycle, gamma/lambda at
each cycle; Akaike Information Criterion at each cyle and Bayesian (Schwartz) Information Criterion
at each cycle, the mean parameter values at each cycle (normalized to starting values); the normalized
standard deviation of the population distribution for each parameter at each cycle; and
the normalized median parameter values at each cycle.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}

Plot PM_cycle objects. These objects are created by as part of a \link{PM_result} object
when \link{PM_load} is run.
}
\examples{
\dontrun{
NPex$cycle$plot()
NPex$cycle$plot(omit = 0, marker = list(symbol = "cross"), line = list(width = 1))
NPex$cycle$plot(
  linetypes = "dash", colors = "Blues", marker = list(size = 1),
  line = list(width = 3)
)
NPex$cycle$plot(
  grid = FALSE,
  xlab = list(bold = FALSE, font = list(color = "red", family = "Arial", size = 10))
)
}
}
\seealso{
\link{PM_result}, \link[plotly:schema]{schema}

Other PMplots:
\code{\link[=plot.PM_cov]{plot.PM_cov()}},
\code{\link[=plot.PM_data]{plot.PM_data()}},
\code{\link[=plot.PM_final]{plot.PM_final()}},
\code{\link[=plot.PM_model]{plot.PM_model()}},
\code{\link[=plot.PM_op]{plot.PM_op()}},
\code{\link[=plot.PM_opt]{plot.PM_opt()}},
\code{\link[=plot.PM_pop]{plot.PM_pop()}},
\code{\link[=plot.PM_post]{plot.PM_post()}},
\code{\link[=plot.PM_pta]{plot.PM_pta()}},
\code{\link[=plot.PM_sim]{plot.PM_sim()}},
\code{\link[=plot.PM_valid]{plot.PM_valid()}}
}
\author{
Michael Neely
}
\concept{PMplots}
