Learn R Programming

lattice (version 0.17-25)

panel.superpose: Panel Function for Display Marked by groups

Description

These are panel functions for Trellis displays useful when a grouping variable is specified for use within panels. The x (and y where appropriate) variables are plotted with different graphical parameters for each distinct value of the grouping variable.

Usage

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",
                distribute.type = FALSE)
panel.superpose.2(..., distribute.type = TRUE)

Arguments

x,y
coordinates of the points to be displayed
panel.groups
the panel function to be used for each group of points. Defaults to panel.xyplot (behaviour in S).

To be able to distinguish between different levels of the originating group inside panel.groups, it will be supplied

subscripts
subscripts giving indices in original data frame
groups
a grouping variable. Different graphical parameters will be used to plot the subsets of observations given by each distinct value of groups. The default graphical parameters are obtained from superpose.symbol and
type
usually a character vector specifying what should be drawn for each group, passed on to the panel.groups function, which must know what to do with it. By default, this is panel.xyplot
col, col.line, col.symbol, pch, cex, fill, font, fontface, fontfamily, lty, lwd, alpha
graphical parameters, replicated to be as long as the number of groups. These are eventually passed down to panel.groups, but as scalars rather than vectors. When panel.groups is called for the i-th level of g
...
Extra arguments. Passed down to panel.superpose from panel.superpose.2, and to panel.groups from panel.superpose.
distribute.type
logical controlling interpretation of the type argument.

Details

panel.superpose and panel.superpose.2 differ essentially in how type is interpreted by default. The default behaviour in panel.superpose is the opposite of that in S, which is the same as that of panel.superpose.2.

See Also

Different functions when used as panel.groups gives different types of plots, for example panel.xyplot, panel.dotplot and panel.linejoin (This can be used to produce interaction plots).

See Lattice for an overview of the package.