\Header{plot.factor}{Plotting factor variables}
\keyword{hplot}{plot.factor}
\begin{Usage}
\begin{verbatim}
plot.factor(x, y, legend.text = levels(y),...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x,y}] numeric or factor.  \texttt{y} may be missing.
\item[\texttt{legend.text}] a vector of text used to construct a legend for
the plot. Only used if \texttt{y} is present and a factor.
\item[\texttt{...}] Further arguments to \texttt{\Link{plot}}, see also
\texttt{\Link{par}}.
\end{ldescription}
\end{Arguments}
\begin{Description}
This functions implements a ``scatterplot'' method for
\texttt{\Link{factor}} arguments of the \emph{generic}
\texttt{\Link{plot}} function.
Actually, \texttt{\Link{boxplot}} or \texttt{\Link{barplot}} are used when
appropriate.\end{Description}
\begin{SeeAlso}
\texttt{\Link{plot.default}}, \texttt{\Link{plot.formula}},
\texttt{\Link{barplot}}, \texttt{\Link{boxplot}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(plants)
plot(plants)                             # -> plot.data.frame
plot(weight ~ group, data=plants)        # numeric vector ~ factor
plot(cut(weight,2) ~ group, data=plants) # factor ~ factor
\end{ExampleCode}
\end{Examples}

