\Header{plot.factor}{Plotting Factor Variables}
\keyword{hplot}{plot.factor}
\begin{Description}\relax
This functions implements a \dQuote{scatterplot} method for
\code{\Link{factor}} arguments of the \emph{generic}
\code{\Link{plot}} function.
Actually, \code{\Link{boxplot}} or \code{\Link{barplot}} are used when
appropriate.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'factor':
plot(x, y, legend.text = levels(y), ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x,y}] numeric or factor.  \code{y} may be missing.
\item[\code{legend.text}] a vector of text used to construct a legend for
the plot. Only used if \code{y} is present and a factor.
\item[\code{...}] Further arguments to \code{\Link{plot}}, see also
\code{\Link{par}}.
\end{ldescription}
\end{Arguments}
\begin{SeeAlso}\relax
\code{\Link{plot.default}}, \code{\Link{plot.formula}},
\code{\Link{barplot}}, \code{\Link{boxplot}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(PlantGrowth)
plot(PlantGrowth)                                # -> plot.data.frame
plot(weight ~ group, data = PlantGrowth)         # numeric vector ~ factor
plot(cut(weight, 2) ~ group, data = PlantGrowth) # factor ~ factor
## passing "..." to barplot() eventually:
plot(cut(weight, 3) ~ group, data = PlantGrowth, density = 16*(1:3),col=NULL)

plot(PlantGrowth$group, axes=FALSE, main="no axes")# extremly silly
\end{ExampleCode}
\end{Examples}

