Simple interface to generate a list appropriate for
1 2 3 4 5 6
character or expression vector, to be used as labels for levels of the grouping variable
Used as top-level components of the list produced, to be used for
the text labels. Defaults to the values in
further arguments added to the list, eventually passed to
A lattice plot can include a legend (key) if an appropriate list is
specified as the
key argument to a high level Lattice function
xyplot. This key can be very flexible, but that
flexibility comes at a cost: this list needs to be fairly complicated
even in simple situations.
simpleKey is designed as a useful
shortcut in the common case of a key drawn in conjunction with a
grouping variable, using the default graphical settings.
simpleKey function produces a suitable
using a simpler interface. The resulting list will use the
text argument as a text component, along with at most one set
each of points, rectangles, and lines. The number of entries (rows)
in the key will be the length of the
text component. The
graphical parameters for the additional components will be derived
from the default graphical settings (wherein lies the simplification,
as otherwise these would have to be provided explicitly).
simpleKey directly is usually unnecessary. It is most
commonly invoked (during the plotting of the
auto.key argument is supplied in a high-level plot
groups argument. In that case, the
simpleKey defaults to
levels(groups), and the
defaults for the other arguments depend on the relevant high-level
function. Note that these defaults can be overridden by supplying
auto.key as a list containing the replacement values.
A list that would work as the
key argument to
Deepayan Sarkar Deepayan.Sarkar@R-project.org
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.