\HeaderA{plot.formula}{Formula Notation for Scatterplots}{plot.formula}
\aliasA{lines.formula}{plot.formula}{lines.formula}
\aliasA{points.formula}{plot.formula}{points.formula}
\keyword{hplot}{plot.formula}
\begin{Description}\relax
Specify a scatterplot or add points or lines via a formula.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'formula':
plot(formula, data = parent.frame(), ..., subset,
             ylab = varnames[response], ask = dev.interactive())

## S3 method for class 'formula':
points(formula, data = parent.frame(), ..., subset)

## S3 method for class 'formula':
lines(formula, data = parent.frame(), ..., subset)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{formula}] a \code{\LinkA{formula}{formula}}, such as \code{y \textasciitilde{} x}.
\item[\code{data}] a data.frame (or list) from which the variables in
\code{formula} should be taken.
\item[\code{...}] Arguments to be passed to or from other methods.
\code{horizontal = TRUE} is also accepted.
\item[\code{subset}] an optional vector specifying a subset of observations
to be used in the fitting process.
\item[\code{ylab}] the y label of the plot(s).
\item[\code{ask}] logical, see \code{\LinkA{par}{par}}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Both the terms in the formula and the \code{...} arguments are
evaluated in \code{data} enclosed in \code{parent.frame()} if
\code{data} is a list or a data frame. The terms of the formula and
those arguments in \code{...} that are of the same length as
\code{data} are subjected to the subsetting specified in
\code{subset}. If the formula in \code{plot.formula} contains more
than one non-response term, a series of plots of y against each term
is given.  A plot against the running index can be specified as
\code{plot(y \textasciitilde{} 1)}.

Missing values are not considered in these methods, and in particular
cases with missing values are not removed.

If \code{y} is an object (i.e. has a \code{\LinkA{class}{class}} attribute)
then \code{plot.formula} looks for a plot method for that class first.
Otherwise, the class of \code{x} will determine the type of the plot.
For factors this will be a parallel boxplot, and argument
\code{horizontal = TRUE} can be used (see \code{\LinkA{boxplot}{boxplot}}).
\end{Details}
\begin{Value}
These functions are invoked for their side effect of drawing 
in the active graphics device.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{plot.default}{plot.default}}, \code{\LinkA{points}{points}}, \code{\LinkA{lines}{lines}},
\code{\LinkA{plot.factor}{plot.factor}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
op <- par(mfrow=c(2,1))
plot(Ozone ~ Wind, data = airquality, pch=as.character(Month))
plot(Ozone ~ Wind, data = airquality, pch=as.character(Month),
     subset = Month != 7)
par(op)
\end{ExampleCode}
\end{Examples}

