EVOLUTION-MANAGER
Edit File: panel.superpose.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: Panel Function for Display Marked by groups</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 F_2_panel.superpose {lattice}"><tr><td>F_2_panel.superpose {lattice}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Panel Function for Display Marked by groups </h2> <h3>Description</h3> <p>These are panel functions for Trellis displays useful when a grouping variable is specified for use within panels. The <code>x</code> (and <code>y</code> where appropriate) variables are plotted with different graphical parameters for each distinct value of the grouping variable. </p> <h3>Usage</h3> <pre> panel.superpose(x, y = NULL, subscripts, groups, panel.groups = "panel.xyplot", ..., col, col.line, col.symbol, pch, cex, fill, font, fontface, fontfamily, lty, lwd, alpha, type = "p", grid = FALSE, distribute.type = FALSE) panel.superpose.2(..., distribute.type = TRUE) panel.superpose.plain(..., col, col.line, col.symbol, pch, cex, fill, font, fontface, fontfamily, lty, lwd, alpha) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x,y</code></td> <td> <p>Coordinates of the points to be displayed. Usually numeric. </p> </td></tr> <tr valign="top"><td><code>panel.groups</code></td> <td> <p>The panel function to be used for each subgroup of points. Defaults to <code>panel.xyplot</code>. </p> <p>To be able to distinguish between different levels of the originating group inside <code>panel.groups</code>, it will be supplied two special arguments called <code>group.number</code> and <code>group.value</code> which will hold the numeric code and factor level corresponding to the current level of <code>groups</code>. No special care needs to be taken when writing a <code>panel.groups</code> function if this feature is not used. </p> </td></tr> <tr valign="top"><td><code>subscripts</code></td> <td> <p>An integer vector of subscripts giving indices of the <code>x</code> and <code>y</code> values in the original data source. See the corresponding entry in <code><a href="xyplot.html">xyplot</a></code> for details. </p> </td></tr> <tr valign="top"><td><code>groups</code></td> <td> <p>A grouping variable. Different graphical parameters will be used to plot the subsets of observations given by each distinct value of <code>groups</code>. The default graphical parameters are obtained from the <code>"superpose.symbol"</code> and <code>"superpose.line"</code> settings using <code><a href="trellis.par.get.html">trellis.par.get</a></code> wherever appropriate. </p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p> Usually a character vector specifying how each group should be drawn. Formally, it is passed on to the <code>panel.groups</code> function, which must know what to do with it. By default, <code>panel.groups</code> is <code><a href="panel.xyplot.html">panel.xyplot</a></code>, whose help page describes the admissible values. </p> <p>The functions <code>panel.superpose</code> and <code>panel.superpose.2</code> differ only in the default value of <code>distribute.type</code>, which controls the way the <code>type</code> argument is interpreted. If <code>distribute.type = FALSE</code>, then the interpretation is the same as for <code>panel.xyplot</code> for each of the unique groups. In other words, if <code>type</code> is a vector, all the individual components are honoured concurrently. If <code>distribute.type = TRUE</code>, <code>type</code> is replicated to be as long as the number of unique values in <code>groups</code>, and one component used for the points corresponding to the each different group. Even in this case, it is possible to request multiple types per group, specifying <code>type</code> as a list, each component being the desired <code>type</code> vector for the corresponding group. </p> <p>If <code>distribute.type = FALSE</code>, any occurrence of <code>"g"</code> in <code>type</code> causes a grid to be drawn, and all such occurrences are removed before <code>type</code> is passed on to <code>panel.groups</code>. </p> </td></tr> <tr valign="top"><td><code>grid</code></td> <td> <p> Logical flag specifying whether a background reference grid should be drawn. See <code><a href="panel.xyplot.html">panel.xyplot</a></code> for details. </p> </td></tr> <tr valign="top"><td><code>col</code></td> <td> <p> A vector color specification. See Details. </p> </td></tr> <tr valign="top"><td><code>col.line</code></td> <td> <p> A vector color specification. See Details. </p> </td></tr> <tr valign="top"><td><code>col.symbol</code></td> <td> <p> A vector color specification. See Details. </p> </td></tr> <tr valign="top"><td><code>pch</code></td> <td> <p> A vector plotting character specification. See Details. </p> </td></tr> <tr valign="top"><td><code>cex</code></td> <td> <p> A vector size factor specification. See Details. </p> </td></tr> <tr valign="top"><td><code>fill</code></td> <td> <p> A vector fill color specification. See Details. </p> </td></tr> <tr valign="top"><td><code>font, fontface, fontfamily</code></td> <td> <p> A vector color specification. See Details. </p> </td></tr> <tr valign="top"><td><code>lty</code></td> <td> <p> A vector color specification. See Details. </p> </td></tr> <tr valign="top"><td><code>lwd</code></td> <td> <p> A vector color specification. See Details. </p> </td></tr> <tr valign="top"><td><code>alpha</code></td> <td> <p> A vector alpha-transparency specification. See Details. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p> Extra arguments. Passed down to <code>panel.superpose</code> from <code>panel.superpose.2</code>, and to <code>panel.groups</code> from <code>panel.superpose</code>. </p> </td></tr> <tr valign="top"><td><code>distribute.type</code></td> <td> <p>logical controlling interpretation of the <code>type</code> argument. </p> </td></tr> </table> <h3>Details</h3> <p><code>panel.superpose</code> divides up the <code>x</code> (and optionally <code>y</code>) variable(s) by the unique values of <code>groups[subscripts]</code>, and plots each subset with different graphical parameters. The graphical parameters (<code>col.symbol</code>, <code>pch</code>, etc.) are usually supplied as suitable atomic vectors, but can also be lists. When <code>panel.groups</code> is called for the <code>i</code>-th level of <code>groups</code>, the corresponding element of each graphical parameter is passed to it. In the list form, the individual components can themselves be vectors. </p> <p>The actual plot for each subgroup is created by the <code>panel.groups</code> function. With the default <code>panel.groups</code>, the <code>col</code> argument is overridden by <code>col.line</code> and <code>col.symbol</code> for lines and points respectively, which default to the <code>"superpose.line"</code> and <code>"superpose.symbol"</code> settings. However, <code>col</code> will still be supplied as an argument to <code>panel.groups</code> functions that make use of it, with a default of <code>"black"</code>. The defaults of other graphical parameters are also taken from the <code>"superpose.line"</code> and <code>"superpose.symbol"</code> settings as appropriate. The <code>alpha</code> parameter takes it default from the <code>"superpose.line"</code> setting. </p> <p><code>panel.superpose</code> and <code>panel.superpose.2</code> differ essentially in how <code>type</code> is interpreted by default. The default behaviour in <code>panel.superpose</code> is the opposite of that in S, which is the same as that of <code>panel.superpose.2</code>. </p> <p><code>panel.superpose.plain</code> is the same as <code>panel.superpose</code>, except that the default settings for the style arguments are the same for all groups and are taken from the default plot style. It is used in <code><a href="xyplot.ts.html">xyplot.ts</a></code>. </p> <h3>Author(s)</h3> <p>Deepayan Sarkar <a href="mailto:Deepayan.Sarkar@R-project.org">Deepayan.Sarkar@R-project.org</a> (<code>panel.superpose.2</code> originally contributed by Neil Klepeis) </p> <h3>See Also</h3> <p>Different functions when used as <code>panel.groups</code> gives different types of plots, for example <code><a href="panel.xyplot.html">panel.xyplot</a></code>, <code><a href="panel.dotplot.html">panel.dotplot</a></code> and <code><a href="panel.functions.html">panel.average</a></code> (This can be used to produce interaction plots). </p> <p>See <code><a href="Lattice.html">Lattice</a></code> for an overview of the package, and <code><a href="xyplot.html">xyplot</a></code> for common arguments (in particular, the discussion of the extended formula interface and the <code>groups</code> argument). </p> <hr /><div style="text-align: center;">[Package <em>lattice</em> version 0.20-38 <a href="00Index.html">Index</a>]</div> </body></html>