identify              package:graphics              R Documentation

_I_d_e_n_t_i_f_y _P_o_i_n_t_s _i_n _a _S_c_a_t_t_e_r _P_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     '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 enough to the pointer, its index will be returned
     as part of the value of the call.

_U_s_a_g_e:

     identify(x, ...)

     ## Default S3 method:
     identify(x, y = NULL, labels = seq(along = x), pos = FALSE,
              n = length(x), plot = TRUE, offset = 0.5, ...)

_A_r_g_u_m_e_n_t_s:

     x,y: coordinates of points in a scatter plot.  Alternatively, any
          object which defines coordinates (a plotting structure, time
          series etc: see 'xy.coords') can be given as 'x', and 'y'
          left undefined.

  labels: an optional vector, the same length as 'x' and 'y', giving
          labels for the points.

     pos: if 'pos' is 'TRUE', a component is added to the return value
          which indicates where text was plotted relative to each
          identified point: see Value.

       n: the maximum number of points to be identified.

    plot: logical: if 'plot' is 'TRUE', the labels are printed at the
          points and if 'FALSE' they are omitted.

  offset: the distance (in character widths) which separates the label
          from identified points.

     ...: further arguments passed to 'par' such as 'cex', 'col' and
          'font'.

_D_e_t_a_i_l_s:

     'identify' is only supported on screen devices such as 'X11',
     'windows' and 'quartz'.  On other devices the call will do
     nothing.

     If 'plot' is 'TRUE', the point is labelled with the corresponding
     element of 'text'. The labels are placed below, to the left, above
     or to the right of the identified point, depending on where the
     cursor was relative to the point.

     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 the
     'ESC' key.

     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.

_V_a_l_u_e:

     If 'pos' is 'FALSE', an integer vector containing the indexes of
     the identified points.

     If 'pos' is 'TRUE', a list containing a component 'ind',
     indicating which points were identified and a component 'pos',
     indicating where the labels were placed relative to the identified
     points (1=below, 2=left, 3=above and 4=right).

_N_o_t_e:

     If 'plot = TRUE' the size of the text and the units of 'offset'
     are scaled by the setting of 'par("cex")'.

     'Close enough' is defined to be within 0.25 inch.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     'locator'

