Identify Points on Trellis Xyplot

DESCRIPTION:

Interactively identifies points on a multipanel plot made by xyplot.

USAGE:

identify.xyplot(x, labels=<see below>, n=length(x$x), plot=T, 
                atpen=T, offset=0.5, pts, tolerance=0.5, ...) 

ARGUMENTS:

x
An xyplot object created by the xyplot function or by print.trellis after plotting an xyplot object.

OPTIONAL ARGUMENTS:

labels
The text strings to use to label the identified points. By default this will be the names attached to the x or y components of the x argument, if they exist, or 1:length(x$x) otherwise. If xyplot is given a data frame as its data argument it will copy the row names of the data frame to x$x.
n
The maximum number of points to identify.
plot
As in identify.default, if TRUE (the default) the selected points will have labels printed next to them. Otherwise the labels are not used.
atpen
Same as in identify.default.
offset
Same as in identify.default.
pts
pts is not implemented yet, but should act like the pts argument to identify.default. However pts must have 3 components instead of 2: x and y give the coordinates as before but panel gives the number of the panel the points come from.
tolerance
Same as in identify.default.
...
All unrecognized arguments are passed to text () to control the appearance of the labels.

VALUE:

An integer vector giving the indices into x$x and x$y of the selected points.

SIDE EFFECTS:

Labels are plotted on the current plot. In general the plot will be redrawn before identification starts since the raw xyplot object doesn't include information on the coordinate systems used in the plot. If you save the result of print(xyplot(...)) and use that as the input to identify.xyplot you may avoid the redrawing.

SEE ALSO:

, , .

EXAMPLES:

print(tmp <- xyplot(Mileage~Disp.|equal.count(Weight,3), 
        data=fuel.frame)) 
i <- identify(tmp) # identify points you don't want to see in next plot 
print(tmp <- xyplot(Mileage~Disp.|equal.count(Weight,3), 
        data=fuel.frame, subset = -i))