updatePlots              package:iSPlot              R Documentation

_U_p_d_a_t_e _a_n_y _V_i_e_w_s _t_h_a_t _a_r_e _P_l_o_t_s

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

     updatePlots is called by the handleMessage method for a 
     gUpdateViewMessage object.  Currently, it calls updateSPlots to
     update scatterplot views, but if new types of plots are created,
     another function could also be called here to update the new plot
     type.  updateSPlots calls either updatePoints or replot, depending
     on what type of change was  performed on the data and thus, what
     type of update the plot needs.   updateSPlots loops through all
     scatterplots that need to be updated and  for each, it calls
     either updatePoints or replot.

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

     updatePlots(type, plotIndex, data)
     updateSPlots(type, plotIndex, data)

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

    type: the type of update the plot needs, either "updatePoints" or
          "replot"  

plotIndex: the index of the plot in the environment variable, viewList

    data: the row names to be updated 

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

     Elizabeth Whalen

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

     'gUpdateViewMessage-class', 'updatePoints', 'replot'

_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)  
         # now set the view mode
         setHighlightMode()

         # now click on a point on the plot and that will cause updatePlots
         # to be called - you can tell it was called because the data and
         # thus, the plot will change  
       }

