\HeaderA{plotPenLL}{Plot the log-likelihood and penalized
log-likelihoods (AIC, BIC)}{plotPenLL}
\keyword{manip}{plotPenLL}
\begin{Description}\relax
Plot the log-likelihood and two versions of penalized
log-likelihoods (AIC, BIC) for a segmentation object.
\end{Description}
\begin{Usage}
\begin{verbatim}
plotPenLL(seg, extrabar=numeric(0), type="b", lty=1, pch=16, lwd=2, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{seg}] A \code{\LinkA{segmentation}{segmentation.Rdash.class}} object.
\item[\code{extrabar}] In addition to the location of maximmal BIC,
vertical bars are drawn at these x-positions as well.
\item[\code{type, pch, lty, lwd, ...}] Get passed on to \code{\LinkA{matplot}{matplot}}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function is used in the vignette:
\emph{How to use the segment function to fit a piecewise constant curve.}
\end{Details}
\begin{Value}
The function is called for its side effect, which is creating a plot
in the current graphics device.
\end{Value}
\begin{Author}\relax
Wolfgang Huber \textless{}huber@ebi.ac.uk\textgreater{}
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  x = rep( sin((0:4)/2*pi), each=3) + rnorm(3*5, sd=0.1)
  res = segment(x, maxseg=8, maxk=15)
  plotPenLL(res)
\end{ExampleCode}
\end{Examples}

