Get Coordinates from Trellis Plot

DESCRIPTION:

Returns the cursor coordinates and panel number in a 2 dimensional trellis plot.

USAGE:

locator.2dtrellis(x, n, ...) 

REQUIRED ARGUMENTS:

x
The output of the xyplot function, or other function that creates an object in the class 2dtrellis.
n
The maximum number of points to locate.

OPTIONAL ARGUMENTS:

...
Unrecognized arguments will be passed to locator.

VALUE:

A list with components x, y, and panel, each of length n (or smaller, if the selection process was aborted early). The x and y coordinates are in the coordinate system of the corresponding panel.

SIDE EFFECTS:

If the type argument to identify is used some marks may be plotted at the selected points.

SEE ALSO:

, .

EXAMPLES:

tmp <- xyplot(Life.Exp~Frost|Region, 
        data=data.frame(state.x77, Region=state.region) 
tmp # to actually make the plot 
locator(tmp, 4)