.BG
.VE $Header: /usr3/s/current/s/.help/RCS/identify,v 1.2 83/12/30 19:29:19 rab Exp $
.FN identify
.TL
identify: Identify Points on Plot
.CS
identify(x, y, labels, n, plot, atpen, offset)
.PP
.AG x,y
co-ordinates of points that may be identified.
A time-series or structure containing `x' and `y' may also be given
in place of `x,y'.  Missing values (NAs) are allowed.
.AG labels
optional vector giving labels for each of the points.
If supplied, must have the same length as `x' and `y'.
Default is `seq(x)'.
.AG n
maximum number of points to identify.
.AG plot
flag, if TRUE (the default), `identify' plots the labels of
the points identified. In any case, the subscripts are
returned.
.AG atpen
flag, if TRUE (the default) plotted identification is
relative to pen position when point is identified;
otherwise, plotting is relative to the identified `x,y' value.
Useful for controlling position of labels when points are
crowded.
.AG offset
identification is plotted as a text string, moved `offset'
character widths from the point (default .5).  If the pen was
left (right) of the nearest point, the label will be offset
to the left (right) of the point.
.PP
Graphical parameters may also be supplied as arguments to this
function (see `par').
.RT
indices (in `x' and `y') corresponding to identified points.
.PP
.PP
See the documentation for the specific
graphics device for details on graphical input techniques.
.PP
The nearest point to pen position is identified, but must be at most
half-inch from pen.  In case of ties, earliest point is identified.
.EX
identify(x,y,encode(z))   # plot z values when x,y points identified

bad <- identify(x,y,plot=FALSE)
xgood <- x[-bad]       #eliminate identified "bad" points
ygood <- y[-bad]         #from x and y
.KW plot*
.KW graphic input
.KW iplot*
.KW dplot*
.KW aplot*
.WR
