identify(x, y, labels=seq(along=x), n=length(x),
plot=true, offset=0.5, labpos=false)
x,y
|
coodinates of points in a scatter plot.
Alternatively, any object which can defines coordinates
(a plotting structure, time series etc.) can be given as
x and |
identify reads the position of the graphics pointer when
the (first) mouse button is pressed. It then searches the coordinates
given in x and y for the point closest to the pointer.
If this point is close to the pointer, its index will be returned
as part of the value of the call. If in addition, plot is
true the point is labelled with the corresponding element of
text.
The labels are placed either below, to the left, above or to
the right of the identified point, depending on where the cursor was.
The identification process is terminated by
pressing any mouse button other than the first,
or by clicking outside the graphics window.
Value
If labpos is false, identify returns an integer
vector containing the indexes of the identified points.
If labpos is true, identify returns a list
containing a component ind, indicating which
points were an identified and a component labpos,
indicating where the labels were placed relative to the
identified points.