\name{plot.surface}
\alias{plot.surface}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ Contour plot of the estimated expected utility surface. }
\description{
  Draws a countour plot of the estimated expected utility for a fixed value of \code{b0}.
}
\usage{
plot.surface(bgrid, u, b0, max = TRUE, textb0 = TRUE, xlab='b1', ylab='b2', ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{bgrid}{ Grid with \code{b0},\code{b1},\code{b2} values as the element \code{"bgrid"} returned by \code{"read.forwsim"}. }
  \item{u}{ Expected utility for each point in the grid. }
  \item{b0}{ Only grid points with the indicated \code{b0} will be used for plotting. }
  \item{max}{ If set to \code{TRUE} the point at which the maximum is achieved will be indicated with a square.}
  \item{textb0}{ If \code{TRUE}, the value of \code{b0} will be added to the top right of the plot. }
  \item{xlab}{ x-axis label as in \code{"contour"}.}
  \item{ylab}{ y-axis label as in \code{"contour"}.}
  \item{\dots}{ Optional arguments to \code{"contour"}. }
}
\value{
  No value returned, the function is used for its side effects.
}
\author{ David Rossell }

\seealso{ \code{contour} }
\examples{
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

}
\keyword{ contour }% at least one, from doc/KEYWORDS