panel.identify
is similar to identify
. When
called, it waits for the user to identify points (in the panel being
drawn) via mouse clicks. Clicks other than left-clicks terminate the
procedure. Although it is possible to call it as part of the panel
function, it is more typical to use it to identify points after
plotting the whole object, in which case a call to
trellis.focus
first is necessary. panel.brush.splom
is meant for use with splom
,
and requires a panel to be chosen using trellis.focus
before it
is called. Clicking on a point causes that and the corresponding
proections in other pairwise scatter plots to be highlighted.
panel.identify.qqmath
is a specialized wrapper meant for use
with the display produced by qqmath
.
One way in which panel.identify
etc. are different from
identify
is in how it uses the subscripts
argument. In general, when one identifies points in a panel, one
wants to identify the origin in the data frame used to produce the
plot, and not within that particular panel. This information is
available to the panel function, but only in certain situations. One
way to ensure that subscripts
is available is to specify
subscripts = TRUE
in the high level call such as xyplot
.
If subscripts
is not explicitly specified in the call to
panel.identify
, but is available in panel.args
, then
those values will be used. Otherwise, they default to
seq_along(x)
. In either case, the final return value will be
the subscripts that were marked.
The process of printing (plotting) a Trellis object builds up a grid
layout with named viewports which can then be accessed to modify the
plot further. While full flexibility can only be obtained by using
grid functions directly, a few lattice functions are available for the
more common tasks.
trellis.focus
can be used to move to a particular panel or
strip, identified by its position in the array of panels. It can also
be used to focus on the viewport corresponding to one of the labels or
a legend, though such usage would be less useful. The exact
viewport is determined by the name
along with the other
arguments, not all of which are relevant for all names. Note that
when more than one object is plotted on a page, trellis.focus
will always go to the plot that was created last. For more
flexibility, use grid functions directly (see note below).
After a successful call to trellis.focus
, the desired viewport
(typically panel or strip area) will be made the current
viewport (plotting area), which can then be enhanced by calls to
standard lattice panel functions as well as grid functions.
It is quite common to have the layout of panels chosen when a
"trellis"
object is drawn, and not before then. Information on
the layout (specifically, how many rows and columns, and which packet
belongs in which position in this layout) is retained for the last
"trellis"
object plotted, and is available through
trellis.currentLayout
.
trellis.unfocus
unsets the focus, and makes the top level
viewport the current viewport.
trellis.switchFocus
is a convenience function to switch from
one viewport to another, while preserving the current row
and
column
. Although the rows and columns only make sense for
panels and strips, they would be preserved even when the user switches
to some other viewport (where row/column is irrelevant) and then
switches back.
Once a panel or strip is in focus, trellis.panelArgs
can be
used to retrieve the arguments that were available to the panel
function at that position. In this case, it can be called without
arguments as
trellis.panelArgs()
This usage is also allowed when a "trellis"
object is being
printed, e.g. inside the panel functions or the axis function (but not
inside the prepanel function). trellis.panelArgs
can also
retrieve the panel arguments from any "trellis"
object. Note
that for this usage, one needs to specify the packet.number
(as
described under the panel
entry in xyplot
) and
not the position in the layout, because a layout determines the panel
only after the object has been printed.
It is usually not necessary to call trellis.vpname
and
trellis.grobname
directly. However, they can be useful in
generating appropriate names in a portable way when using grid
functions to interact with the plots directly, as described in the
note below.