identify
is a generic function, and only the default method is
described here.
identify
is only supported on screen devices such as
X11
, windows
and quartz
. On other devices the
call will do nothing.
Clicking near (as defined by tolerance
) a point adds it to the
list of identified points. Points can be identified only once, and if
the point has already been identified or the click is not
near any of the points a message is printed immediately on
the R console.
If plot
is TRUE
, the point is labelled with the
corresponding element of labels
. If atpen
is false (the
default) the labels are placed below, to the left, above or to the
right of the identified point, depending on where the pointer was
relative to the point. If atpen
is true, the
labels are placed with the bottom left of the string's box at the
pointer.
For the usual X11
device the identification process is
terminated by pressing any mouse button other than the first.
For the quartz
device the process is terminated by
pressing either the pop-up menu equivalent (usually second mouse
button or Ctrl
-click) or the ESC
key.
The identification process is terminated by clicking the second button
and selecting ‘Stop’ from the menu, or from the ‘Stop’
menu on the graphics window.
On most devices which support identify
, successful selection of
a point is indicated by a bell sound unless
options(locatorBell = FALSE)
has been set.
If the window is resized or hidden and then exposed before the identification
process has terminated, any labels drawn by identify
will disappear. These will reappear once the identification process has
terminated and the window is resized or hidden and exposed again.
This is because the labels drawn by identify
are not
recorded in the device's display list until the identification process has
terminated.
If you interrupt the identify
call this leaves the graphics
device in an undefined state, with points labelled but labels not
recorded in the display list. Copying a device in that state
(e.g., saving the plot from the window's menu)
will give unpredictable results.