\name{plot.cerardat_obj}
\alias{plot.cerardat_obj}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
plot cerardat model
}
\description{
plot cerardat model
}
\usage{
\method{plot}{cerardat_obj}(x, 
  which = NULL,
  main="model dateEv (red) and dateAc (black)",
  xlab = "Date", 
  ylab = "Density",
  col1 = rgb(0.93,0.23,0.23,0.5), 
  col2 = "black",
  xlim=NULL, 
  ylim=NULL,...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{x}{
a \link[SPARTAAS]{cerardat} output.
}
  \item{which}{
  Vector containing the plots you want (rownames or row number on the contingence table: numeric).
}
  \item{main}{
  an overall title for the plot: see \link[graphics]{title}.
}
  \item{xlab}{
  a title for the x axis: see \link[graphics]{title}.
}
  \item{ylab}{
  a title for the y axis: see \link[graphics]{title}.
}
  \item{col1}{
  Color of the Event curve (color name, hex code, \link[grDevices]{rgb} function \{grDevices\} for transparency).
}
  \item{col2}{
  Color of the Accumulation curve (color name, hex code, \link[grDevices]{rgb} function \{grDevices\} for transparency).
}
  \item{xlim}{
  Two numeric values, specifying the left limit and the right limit of the scale.
}
  \item{ylim}{
  Two numeric values, specifying the lower limit and the upper limit of the scale.
}
  \item{...}{
  other parameters to be passed through to plotting functions (bty, cex.axis, las).
}
}


\author{
A. COULON

L. BELLANGER

P. HUSI
}

\examples{
\donttest{
data("datacerardat")

resultat = cerardat(df = datacerardat$df,
  row.sup = datacerardat$row.sup,
  date = datacerardat$date,
  nf = NULL,
  confidence = 0.95,
  graph = TRUE
)

#See the first plot
plot(resultat, which = 1)
plot(resultat, 
  which = 1, 
  xlim = c(200, 700),
  ylim = c(0, 0.03),
  col1 = rgb(0.7, 0.7, 0.7, 0.6), 
  col2 = "black", 
  las = 1
)
abline(v = resultat$prediction$date[1], col="grey60", lty=1)
abline(v = resultat$prediction$Fit_dateEv[1], col="grey60", lty=2)
abline(v = resultat$prediction$Median_dateAc[1], col="grey60", lty=3)
legend("topright", 
  legend=c("Date coin", "DateEv", "DateAc"),
  col="grey60",
  lty=c(1, 2, 3)
)

#See the first 10 plots
#plot(resultat, which = 1:10) 

#See all plots
#plot(resultat)
}
}
