EVOLUTION-MANAGER
Edit File: dotchart.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: Cleveland's Dot Plots</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 dotchart {graphics}"><tr><td>dotchart {graphics}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Cleveland's Dot Plots</h2> <h3>Description</h3> <p>Draw a Cleveland dot plot. </p> <h3>Usage</h3> <pre> dotchart(x, labels = NULL, groups = NULL, gdata = NULL, cex = par("cex"), pt.cex = cex, pch = 21, gpch = 21, bg = par("bg"), color = par("fg"), gcolor = par("fg"), lcolor = "gray", xlim = range(x[is.finite(x)]), main = NULL, xlab = NULL, ylab = NULL, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>either a vector or matrix of numeric values (<code>NA</code>s are allowed). If <code>x</code> is a matrix the overall plot consists of juxtaposed dotplots for each row. Inputs which satisfy <code><a href="../../base/html/numeric.html">is.numeric</a>(x)</code> but not <code>is.vector(x) || is.matrix(x)</code> are coerced by <code><a href="../../base/html/numeric.html">as.numeric</a></code>, with a warning.</p> </td></tr> <tr valign="top"><td><code>labels</code></td> <td> <p>a vector of labels for each point. For vectors the default is to use <code>names(x)</code> and for matrices the row labels <code>dimnames(x)[[1]]</code>.</p> </td></tr> <tr valign="top"><td><code>groups</code></td> <td> <p>an optional factor indicating how the elements of <code>x</code> are grouped. If <code>x</code> is a matrix, <code>groups</code> will default to the columns of <code>x</code>.</p> </td></tr> <tr valign="top"><td><code>gdata</code></td> <td> <p>data values for the groups. This is typically a summary such as the median or mean of each group.</p> </td></tr> <tr valign="top"><td><code>cex</code></td> <td> <p>the character size to be used. Setting <code>cex</code> to a value smaller than one can be a useful way of avoiding label overlap. Unlike many other graphics functions, this sets the actual size, not a multiple of <code>par("cex")</code>.</p> </td></tr> <tr valign="top"><td><code>pt.cex</code></td> <td> <p>the <code>cex</code> to be applied to plotting symbols. This behaves like <code>cex</code> in <code>plot()</code>.</p> </td></tr> <tr valign="top"><td><code>pch</code></td> <td> <p>the plotting character or symbol to be used.</p> </td></tr> <tr valign="top"><td><code>gpch</code></td> <td> <p>the plotting character or symbol to be used for group values.</p> </td></tr> <tr valign="top"><td><code>bg</code></td> <td> <p>the background color of plotting characters or symbols to be used; use <code><a href="par.html">par</a>(bg= *)</code> to set the background color of the whole plot.</p> </td></tr> <tr valign="top"><td><code>color</code></td> <td> <p>the color(s) to be used for points and labels.</p> </td></tr> <tr valign="top"><td><code>gcolor</code></td> <td> <p>the single color to be used for group labels and values.</p> </td></tr> <tr valign="top"><td><code>lcolor</code></td> <td> <p>the color(s) to be used for the horizontal lines.</p> </td></tr> <tr valign="top"><td><code>xlim</code></td> <td> <p>horizontal range for the plot, see <code><a href="plot.window.html">plot.window</a></code>, for example.</p> </td></tr> <tr valign="top"><td><code>main</code></td> <td> <p>overall title for the plot, see <code><a href="title.html">title</a></code>.</p> </td></tr> <tr valign="top"><td><code>xlab, ylab</code></td> <td> <p>axis annotations as in <code>title</code>.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p><a href="par.html">graphical parameters</a> can also be specified as arguments.</p> </td></tr> </table> <h3>Value</h3> <p>This function is invoked for its side effect, which is to produce two variants of dotplots as described in Cleveland (1985). </p> <p>Dot plots are a reasonable substitute for bar plots. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <p>Cleveland, W. S. (1985) <em>The Elements of Graphing Data.</em> Monterey, CA: Wadsworth. </p> <p>Murrell, P. (2005) <em>R Graphics</em>. Chapman & Hall/CRC Press. </p> <h3>Examples</h3> <pre> dotchart(VADeaths, main = "Death Rates in Virginia - 1940") op <- par(xaxs = "i") # 0 -- 100% dotchart(t(VADeaths), xlim = c(0,100), main = "Death Rates in Virginia - 1940") par(op) </pre> <hr /><div style="text-align: center;">[Package <em>graphics</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>