

   plot.factor {base}                           R Documentation

   PPlloottttiinngg FFaaccttoorr VVaarriiaabblleess

   DDeessccrriippttiioonn::

        This functions implements a ``scatterplot'' method for
        `factor' arguments of the generic `plot' function.
        Actually, `boxplot' or `barplot' are used when appro-
        priate.

   UUssaaggee::

        plot.factor(x, y, legend.text = levels(y), ...)

   AArrgguummeennttss::

        x,y: numeric or factor.  `y' may be missing.

   legend.text: a vector of text used to construct a legend for
             the plot. Only used if `y' is present and a fac-
             tor.

        ...: Further arguments to `plot', see also `par'.

   SSeeee AAllssoo::

        `plot.default', `plot.formula', `barplot', `boxplot'.

   EExxaammpplleess::

        data(PlantGrowth)
        plot(PlantGrowth)                                # -> plot.data.frame
        plot(weight ~ group, data = PlantGrowth)         # numeric vector ~ factor
        plot(cut(weight, 2) ~ group, data = PlantGrowth) # factor ~ factor

        plot(PlantGrowth$group, axes=FALSE, main="no axes")# extremly silly

