sPlotView-class            package:iSPlot            R Documentation

_C_l_a_s_s "_s_P_l_o_t_V_i_e_w": _A _c_l_a_s_s _t_o _r_e_p_r_e_s_e_n_t _a _s_c_a_t_t_e_r_p_l_o_t _v_i_e_w

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

     sPlotView is a class to represent a view that is a scatterplot.  
     sPlotView inherits from the class, plotView, which inherits from
     the virtual class, genView.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("sPlotView",
     ...)'.

_S_l_o_t_s:

     '_d_f_R_o_w_s': the dataframe rows that are plotted, a numeric vector 

     '_c_o_l_x': the dataframe column plotted on the x axis, a numeric
          vector of length one 

     '_c_o_l_y': the dataframe column plotted on the y axis, a numeric
          vector of length one 

     '_p_l_o_t_D_e_v_i_c_e': the plot device number 

     '_p_l_o_t_P_a_r': the parameter list for the plot, see par() 

     '_d_r_A_r_e_a': an object of class '"GtkDrawingArea"' 

     '_d_a_t_a_N_a_m_e': a character string describing what data is shown in
          the view 

     '_w_i_n': an object of class '"GtkWindow"' that holds the view 

     '_w_i_n_N_u_m': a number that tells what number view this is (for
          example, the first view created will have winNum=1)

_E_x_t_e_n_d_s:

     Class '"plotView"', directly. Class '"genView"', by class
     '"plotView"'.

_M_e_t_h_o_d_s:

     _c_l_i_c_k_E_v_e_n_t Handles button press events on a scatterplot:
          identifies the point and creates and handles a
          gUpdateDataMessage object depending on the view mode 

     _c_o_l_x Returns the 'colx' slot 

     _c_o_l_x<- Sets the 'colx' slot 

     _c_o_l_y Returns the 'coly' slot 

     _c_o_l_y<- Sets the 'coly' slot 

     _d_f_R_o_w_s Returns the 'dfRows' slot 

     _d_f_R_o_w_s<- Sets the 'dfRows' slot 

     _m_o_t_i_o_n_E_v_e_n_t Handles motion notify events on a scatterplot: if the
          view mode is identify, it calls the function checkPoint,
          which identifies the point and creates and handles a
          gUpdateDataMessage object 

     _v_i_e_w_U_p_d_a_t_e_D_a_t_a Called by the initialize method when creating an
          object of class, gUpdateDataMessage.  The viewUpdateData
          method determines how the data will be updated based on the
          view mode, the view object, and the location of the event
          (which point was clicked in this case).  A list containing
          the slot values for the gUpdateDataMessage object is
          returned.

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

     Elizabeth Whalen

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

     'identifyPoint',  'checkPoint', 'genView-class', 'plotView-class',
     'spreadView-class', 'gUpdateDataMessage-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) 
         # this will create an object of class, sPlotView
         is(get("viewList",viewEnv)[[1]],"sPlotView")  
       }

