home *** CD-ROM | disk | FTP | other *** search
-
- _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
-
- identify(x, y, labels=seq(along=x), n=length(x),
- plot=TRUE, offset=0.5, labpos=FALSE)
-
- _A_r_g_u_m_e_n_t_s:
-
- 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 y left
- undefined.
-
- labels : an optional vector, the same length as x and
- y, giving labels for the points.
-
- n : the maximum number of points to be identi-
- fied.
-
- 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.
-
- labpos : if labpos 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).
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- This function 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.
-
- _V_a_l_u_e:
-
- 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 identi-
- fied and a component labpos, indicating where the
- labels were placed relative to the identified points.
-
-