EVOLUTION-MANAGER
Edit File: plot.factor.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Plotting Factor Variables</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for plot.factor {graphics}"><tr><td>plot.factor {graphics}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Plotting Factor Variables</h2> <h3>Description</h3> <p>This functions implements a scatterplot method for <code><a href="../../base/html/factor.html">factor</a></code> arguments of the <em>generic</em> <code><a href="plot.html">plot</a></code> function. </p> <p>If <code>y</code> is missing <code><a href="barplot.html">barplot</a></code> is produced. For numeric <code>y</code> a <code><a href="boxplot.html">boxplot</a></code> is used, and for a factor <code>y</code> a <code><a href="spineplot.html">spineplot</a></code> is shown. For any other type of <code>y</code> the next <code>plot</code> method is called, normally <code><a href="plot.default.html">plot.default</a></code>. </p> <h3>Usage</h3> <pre> ## S3 method for class 'factor' plot(x, y, legend.text = NULL, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, y</code></td> <td> <p>numeric or factor. <code>y</code> may be missing.</p> </td></tr> <tr valign="top"><td><code>legend.text</code></td> <td> <p>character vector for annotation of y axis in the case of a factor <code>y</code>: defaults to <code>levels(y)</code>. This sets the <code>yaxlabels</code> argument of <code><a href="spineplot.html">spineplot</a></code>.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Further arguments to <code><a href="barplot.html">barplot</a></code>, <code><a href="boxplot.html">boxplot</a></code>, <code><a href="spineplot.html">spineplot</a></code> or <code><a href="plot.html">plot</a></code> as appropriate. All of these accept <a href="par.html">graphical parameters</a> (see <code><a href="par.html">par</a></code>) and annotation arguments passed to <code><a href="title.html">title</a></code> and <code>axes = FALSE</code>. None accept <code>type</code>. </p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="plot.default.html">plot.default</a></code>, <code><a href="plot.formula.html">plot.formula</a></code>, <code><a href="barplot.html">barplot</a></code>, <code><a href="boxplot.html">boxplot</a></code>, <code><a href="spineplot.html">spineplot</a></code>. </p> <h3>Examples</h3> <pre> require(grDevices) plot(weight ~ group, data = PlantGrowth) # numeric vector ~ factor plot(cut(weight, 2) ~ group, data = PlantGrowth) # factor ~ factor ## passing "..." to spineplot() eventually: plot(cut(weight, 3) ~ group, data = PlantGrowth, col = hcl(c(0, 120, 240), 50, 70)) plot(PlantGrowth$group, axes = FALSE, main = "no axes") # extremely silly </pre> <hr /><div style="text-align: center;">[Package <em>graphics</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>