replot                package:iSPlot                R Documentation

_R_e_d_r_a_w _a _p_l_o_t _b_e_c_a_u_s_e _d_a_t_a _h_a_s _c_h_a_n_g_e_d

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

     replot tells a plot to redraw itself because the data has changed.
       replot is called when the type of change to the data set was
     either  add or reset.  replot calls the original plotting
     function, scatterplot,  to do the plotting.  Once the plot has
     been redrawn, replot updates  viewList with the new sPlotView
     object returned from scatterplot.

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

     replot(plotIndex)

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

plotIndex: the list index in viewList of the plot that needs to be
          replotted 

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

     Elizabeth Whalen

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

     'scatterplot', 'updatePoints', '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 modify using the control window (by choosing the view mode and
         # then clicking on a plot)
         # by interacting with a plot when the view mode is color, these 
         # functions will be called automatically
         modify("USArrests", Rname=c("Massachusetts","Ohio"), 
                Cname=c("color","color"), data=c("red","green"))
         # updateViews will create a gUpdateViewMessage and call the 
         # handleMessage method, which will call updatePoints because the 
         # type is modify
         updateViews(dfName="USArrests", type="modify", 
                     rowName=c("Massachusetts","Ohio"))

         # should perform reset using Reset under the Edit menu 
         reset("USArrests")
         # updateViews will create a gUpdateViewMessage and call the 
         # handleMessage method, which will call replot because the 
         # type is reset
         updateViews(dfName="USArrests",type="reset")
       }

