\documentclass[a4paper]{article}
\SweaveOpts{echo=FALSE,eps=FALSE,fig=TRUE,keep.source=TRUE}
%\VignettePackage{plotMCMC}
%\VignetteIndexEntry{Gallery}
\usepackage{parskip}
\usepackage{hyperref}
\newcommand\p[1]{{\fontseries{b}\selectfont #1}}
\begin{document}

\title{The \p{plotMCMC} gallery}
\author{Arni Magnusson}
\maketitle

\tableofcontents

\newpage

\section{Overview}%=============================================================

This vignette is only a series of plots, demonstrating how the \p{plotMCMC} plot
examples look in a PDF document, as opposed to the default graphics device.
Useful for package maintenance and as a visual overview of the package.

<<require,fig=FALSE>>=
require(plotMCMC)
@

\newpage

\section{plotAuto}%=============================================================

<<Auto1>>=
plotAuto(xpar$R0)
@

<<Auto2>>=
plotAuto(xpar$R0, thin=10)
@

<<Auto3>>=
plotAuto(xpar, lag.max=50, ann=FALSE, axes=FALSE)
@

\section{plotCumu}%=============================================================

<<Cumu1>>=
plotCumu(xpar$R0, main="R0")
@

<<Cumu2>>=
plotCumu(xpar$cSfull, main="cSfull")
@

<<Cumu3>>=
plotCumu(xpar, probs=c(0.25,0.75), ann=FALSE, axes=FALSE)
@

\section{plotDens}%=============================================================

<<Dens1>>=
plotDens(xbio$"2004", points=TRUE, div=1000, main="2004\n",
         xlab="Biomass age 4+ (1000 t)", tick.number=6, strip=FALSE)
@

<<Dens2>>=
plotDens(xpar, xlab="Parameter value", ylab="Posterior density\n")
@

\section{plotQuant}%============================================================

<<Quant1>>=
plotQuant(xrec, names=substring(names(xrec),3), div=1000, xlab="Year",
          ylab="Recruitment (million one-year-olds)")
@

<<Quant2>>=
plotQuant(xbio, div=1000, xlab="Year", ylab="Biomass age 4+ (kt)")
@

<<Quant3>>=
plotQuant(xbio, style="bars", div=1000, sfrac=0, xlab="Year",
          ylab="Biomass age 4+ (kt)")
@

<<Quant4>>=
plotQuant(xbio, style="lines", div=1000, xlab="Year",
          ylab="Biomass age 4+ (kt)")
@

<<Quant5>>=
plotQuant(xpro, axes=1:2, div=1000, xlab="Year",
          ylab="Biomass age 4+ (kt)")
@

\section{plotSplom}%============================================================

<<Splom1>>=
plotSplom(xpar, pch=".")
@

<<Splom2>>=
plotSplom(xpro, axes=TRUE, between=1, div=1000, main="Future biomass",
          cex.labels=1.5, pch=".", cex=3)
@

\section{plotTrace}%============================================================

<<Trace1>>=
plotTrace(xpar, xlab="Iterations", ylab="Parameter value",
          layout=c(2,4))
@

<<Trace2>>=
plotTrace(xpar$R0, axes=TRUE, div=1000)
@

\end{document}
