printText               package:iSPlot               R Documentation

_P_r_i_n_t _t_h_e _r_o_w _n_a_m_e _n_e_x_t _t_o _a _p_o_i_n_t

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

     printText prints the row name next to a point.  printText is
     called  when the view mode is identify and when the user has
     positioned the  mouse over a point on the active plot.

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

     printText(curPoint, curPlot, color)

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

curPoint: the current point, which is a list containing the elements
          closestXY and closestPoint - it is the list returned from
          identifyPoint 

 curPlot: the active plot, an object of class plotView 

   color: the color of the text, a character string 

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

     Elizabeth Whalen

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

     'checkPoint'

_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 so printText was 
         # called
       }

