identify                package:base                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 to the pointer, its index will be returned as part
     of the value of the call.

_U_s_a_g_e:

     identify(x, ...)
     identify.default(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.) 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 (1=below, 2=left, 3=above and 4=right).

       n: the maximum number of points to be identified.

    plot: 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 to `par(.)'.

_D_e_t_a_i_l_s:

     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.

     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.

