askToReplot              package:iSPlot              R Documentation

_C_h_e_c_k _t_h_a_t _t_h_e _u_s_e_r _w_a_n_t_s _t_o _r_e_d_r_a_w _t_h_e _a_c_t_i_v_e _v_i_e_w

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

     askToReplot opens a gtk window that asks the user if they want to
     replot the active view.  If the user clicks the Yes button, then
     the active view will be redrawn and so will any other views that
     depend on the same data as the active view. So if the active view
     shows data from the dataframe,  USArrests, then any other views
     that plot data from USArrests will also be redrawn.  No changes
     will be made to the dataframe. askToReplot is called when the user
     chooses the menu item 'replot' under the edit menu.  Note that if
     there are no views created, then replot will not be performed and
     a message box will open to let the user know that replot could not
     be performed.

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

     askToReplot()

_D_e_t_a_i_l_s:

     Replotting the active view is useful if the user has used  Find on
     the active scatterplot and thus, there is text on the  scatterplot
     that the user wants to remove, but the user does not want to reset
     the dataframe to its original state (i.e. the user wants to keep
     the changes made to the dataframe).

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

     Elizabeth Whalen

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

     'askToReset'

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

       if (interactive())
       {
         createControlWindow()
         # loading data should be performed through the menu item 'open data'
         data(USArrests)
         loadDFData(USArrests,"USArrests")
         # createView should be performed through the menu item 'plot data'
         createView(type = "plotView", dataName = "USArrests", 
                    plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
                    dfColumns = 1:2) 
         # should choose 'replot' under edit menu to call askToReplot
         askToReplot()        
       }

