Rev 5315 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{F_2_panel.superpose}\alias{panel.superpose}\alias{panel.superpose.2}\title{ Panel Function for Display Marked by groups }\description{These are panel functions for Trellis displays useful when a groupingvariable is specified for use within panels. The \code{x} (and\code{y} where appropriate) variables are plotted with differentgraphical parameters for each distinct value of the grouping variable.}\usage{panel.superpose(x, y = NULL, subscripts, groups,panel.groups = "panel.xyplot",\dots,col, col.line, col.symbol,pch, cex, fill, font,fontface, fontfamily,lty, lwd, alpha,type = "p",distribute.type = FALSE)panel.superpose.2(\dots, distribute.type = TRUE)}\arguments{\item{x,y}{ coordinates of the points to be displayed}\item{panel.groups}{the panel function to be used for each group of points. Defaults to\code{panel.xyplot} (behaviour in S).To be able to distinguish between different levels of theoriginating group inside \code{panel.groups}, it will be supplied aspecial argument called \code{group.number} which will hold thenumeric code corresponding to the current level of \code{groups}.No special care needs to be taken when writing a \code{panel.groups}function if this feature is not used.}\item{subscripts}{ subscripts giving indices in original data frame }\item{groups}{ a grouping variable. Different graphical parameterswill be used to plot the subsets of observations given by eachdistinct value of \code{groups}. The default graphical parametersare obtained from \code{superpose.symbol} and \code{superpose.line}using \code{\link{trellis.par.get}} wherever appropriate}\item{type}{usually a character vector specifying what should be drawn for eachgroup, passed on to the \code{panel.groups} function, which mustknow what to do with it. By default, this is\code{\link{panel.xyplot}}, whose help page describes the admissiblevalues.The functions \code{panel.superpose} and \code{panel.superpose.2}differ only in the default value of \code{distribute.type}, whichcontrols the way the \code{type} argument is interpreted. If\code{distribute.type = FALSE}, then the interpretation is the sameas for \code{panel.xyplot} for each of the unique groups. In otherwords, if \code{type} is a vector, all the individual components arehonoured concurrently. If \code{distribute.type = TRUE},\code{type} is replicated to be as long as the number of uniquevalues in \code{groups}, and one component used for the pointscorresponding to the each different group. Even in this case, it ispossible to request multiple types per group, specifying \code{type}as a list, each component being the desired \code{type} vector forthe corresponding group.If \code{distribute.type = FALSE}, any occurrence of \code{"g"} in\code{type} causes a grid to be drawn, and all such occurrences areremoved before \code{type} is passed on to \code{panel.groups}.}\item{col, col.line, col.symbol, pch, cex, fill, font, fontface,fontfamily, lty, lwd, alpha}{ graphical parameters, replicated to beas long as the number of groups. These are eventually passed downto \code{panel.groups}, but as scalars rather than vectors. When\code{panel.groups} is called for the i-th level of \code{groups},the corresponding element of each graphical parameter is passed toit.}\item{\dots}{ Extra arguments. Passed down to \code{panel.superpose}from \code{panel.superpose.2}, and to \code{panel.groups} from\code{panel.superpose}.}\item{distribute.type}{logical controlling interpretation of the\code{type} argument.}}\details{\code{panel.superpose} and \code{panel.superpose.2} differ essentiallyin how \code{type} is interpreted by default. The default behaviourin \code{panel.superpose} is the opposite of that in S, which is thesame as that of \code{panel.superpose.2}.}\seealso{Different functions when used as \code{panel.groups} gives differenttypes of plots, for example \code{\link{panel.xyplot}},\code{\link{panel.dotplot}} and \code{\link{panel.linejoin}} (This canbe used to produce interaction plots).See \code{\link{Lattice}} for an overview of the package.}\author{Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}(\code{panel.superpose.2} originally contributed by Neil Klepeis)}\keyword{dplot}