\HeaderA{plot.surface}{Contour plot of the estimated expected utility surface.}{plot.surface}
\keyword{contour}{plot.surface}
\begin{Description}\relax
Draws a countour plot of the estimated expected utility for a fixed value of \code{b0}.
\end{Description}
\begin{Usage}
\begin{verbatim}
plot.surface(bgrid, u, b0, max = TRUE, textb0 = TRUE, xlab='b1', ylab='b2', ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{bgrid}] Grid with \code{b0},\code{b1},\code{b2} values as the element \code{"bgrid"} returned by \code{"read.forwsim"}. 
\item[\code{u}] Expected utility for each point in the grid. 
\item[\code{b0}] Only grid points with the indicated \code{b0} will be used for plotting. 
\item[\code{max}] If set to \code{TRUE} the point at which the maximum is achieved will be indicated with a square.
\item[\code{textb0}] If \code{TRUE}, the value of \code{b0} will be added to the top right of the plot. 
\item[\code{xlab}] x-axis label as in \code{"contour"}.
\item[\code{ylab}] y-axis label as in \code{"contour"}.
\item[\code{...}] Optional arguments to \code{"contour"}. 
\end{ldescription}
\end{Arguments}
\begin{Value}
No value returned, the function is used for its side effects.
\end{Value}
\begin{Author}\relax
David Rossell
\end{Author}
\begin{SeeAlso}\relax
\code{contour}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
dir <- 'C:/R/R-2.2.1/library/forwsim/data'                              #read forward simulation output
sim1 <- read.forwsim(dir)

plot.surface(sim1$bgrid,sim1$u,sim1$b0[5],main='')                      #obtain contour plot for 5th b0 value

\end{ExampleCode}
\end{Examples}

