

    \filetitle{plotpp}{Plot prior and/or posterior distributions and/or posterior mode}{grfun/plotpp}

	\paragraph{Syntax}
 
 \begin{verbatim}
 [PRG,POG,FIG,AX,PRLIN,POLIN,BLIN,PRANN] = grfun.plotpp(E,THETA,...)
 [PRG,POG,FIG,AX,PRLIN,POLIN,BLIN,PRANN] = grfun.plotpp(E,ST,...)
 [PRG,POG,FIG,AX,PRLIN,POLIN,BLIN,PRANN] = grfun.plotpp(E,PEST,...)
 \end{verbatim}
 \paragraph{Input arguments}
 
 \begin{itemize}
 \item
   \texttt{E} {[} struct {]} - Estimation input struct, see
   \href{model/estimate}{\texttt{estimate}}, with prior function handles
   from the \href{logdist/Contents}{logdist} package.
 \item
   \texttt{THETA} {[} numeric \textbar{} empty {]} - Array with the chain
   of draws from the posterior simulator
   \href{poster/arwm}{\texttt{arwm}}.
 \item
   \texttt{ST} {[} struct \textbar{} empty {]} - Output struct returned
   by the posterior simulator statistics function
   \href{poster/stats}{\texttt{stats}}.
 \item
   \texttt{PEST} {[} struct \textbar{} empty {]} - Output struct returned
   by the \url{model/estimate} function containing the posterior mode
   estimates.
 \end{itemize}
 \paragraph{Output arguments}
 
 \begin{itemize}
 \item
   \texttt{PRG} {[} struct {]} - Struct with x- and y-axis coordinates to
   plot the prior distribution for each parameter.
 \item
   \texttt{POG} {[} struct {]} - Struct with x- and y-axis coordinates to
   plot the posterior distribution for each parameter.
 \item
   \texttt{FIG} {[} numeric {]} - Handles to the figures created.
 \item
   \texttt{AX} {[} numeric {]} - Handles to the axes (graphs) created.
 \item
   \texttt{PRLIN} {[} numeric {]} - Handles to the prior lines plotted.
 \item
   \texttt{PRLIN} {[} numeric {]} - Handles to the posterior lines
   plotted.
 \item
   \texttt{BLIN} {[} numeric {]} - Handles to the lower and upper bound
   lines plotted.
 \item
   \texttt{TIT} {[} numeric {]} - Handles to the graph titles created.
 \end{itemize}
 \paragraph{Options}
 
 \begin{itemize}
 \item
   \texttt{'describePrior='} {[} \emph{`auto'} \textbar{} true \textbar{}
   false {]} - Add one extra line to each graph title describing the
   prior (name, mean, and std dev); if \texttt{'auto='} the description
   will be shown only if \texttt{'plotPrior='} is true.
 \item
   \texttt{'plotPrior='} {[} \emph{\texttt{true}} \textbar{}
   \texttt{false} {]} - Plot prior distributions.
 \item
   \texttt{'plotPoster='} {[} \emph{\texttt{true}} \textbar{}
   \texttt{false} {]} - Plot posterior distributions.
 \item
   \texttt{'plotBounds='} {[} \emph{\texttt{true}} \textbar{}
   \texttt{false} {]} - Add lower and/or upper bounds to the distribution
   graphs; if false, the bounds are only added if they are within the
   graph x-limits.
 \item
   \texttt{'sigma='} {[} numeric \textbar{} \emph{3} {]} - Number of std
   devs from the mean or the mode (whichever covers a larger area) to the
   left and to right that will be plotted unless running out of bounds.
 \item
   \texttt{'tight='} {[} \emph{\texttt{true}} \textbar{} \texttt{false}
   {]} - Make graph axes tight.
 \item
   \texttt{'xLims='} {[} struct \textbar{} \emph{empty} {]} - Control the
   x-limits of the prior and posterior graphs.
 \end{itemize}
 \paragraph{Description}
 
 If you call \texttt{plotpp} with \texttt{PEST} (i.e.~a struct with
 posterior mode estimates) as the second argument, the posterior modes
 are plotted as vertical lines (stem graphs).
 
 \paragraph{Example}


