checkPoint              package:iSPlot              R Documentation

_S_e_e _i_f (_x,_y) _l_o_c_a_t_i_o_n _f_a_l_l_s _w_i_t_h_i_n _a _p_o_i_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     checkPoint tests whether a (x,y) location falls within a point on
     the  active plot.  checkPoint is called in the callback for the
     motion  notify event.  If the (x,y) location is in a point, then a
      gUpdateDataMessage object is created and the handleMessage method
     is  called.  Also, if the (x,y) location is in a point and the
     view mode is  identify, then the row name for that point is
     printed next to the point  on the active plot.

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

     checkPoint(curx, cury, curPlot)

_A_r_g_u_m_e_n_t_s:

    curx: the x value from the motion notify event 

    cury: the y value from the motion notify event 

 curPlot: the plot object 

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_S_e_e _A_l_s_o:

     'identifyPoint', 'gUpdateDataMessage-class', 'printText',
     'sPlotView-class'

_E_x_a_m_p_l_e_s:

       if (interactive())
       {
         createControlWindow()
         # should load data through Open Data or Open File under the File menu
         data(USArrests)
         loadDFData(USArrests,"USArrests")
         # plotting the data should occur through Plot Data under 
         # the Display menu
         createView(type = "plotView", dataName = "USArrests", 
                    plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
                    dfColumns = 1:2)  
         # should set the view mode using the ViewMode menu
         setIdentifyMode()
         # now move the mouse over a point on the plot and the point should
         # be highlighted with the row name printed next to it

         # note that just moving the mouse over the plot while in identify point
         # will cause checkPoint to be called
       }

