setVariables             package:iSPlot             R Documentation

_S_e_t _V_a_r_i_a_b_l_e _T_o_g_g_l_e _B_u_t_t_o_n_s _i_n _P_l_o_t _D_a_t_a _V_i_e_w

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

     When a user chooses a data set from the list in the plot data 
     view, setVariable will show the variables for that data set as a 
     group of toggle buttons on the right hand side of the control
     window.   There is one set of toggle buttons for the X variable
     and another set  for the Y variable.  Any of the data set
     variables can be chosen as  either X or Y, but there can only be
     one X variable and one Y variable.   setVariable is called from a
     callback that occurs whenever a data set  is chosen from the data
     set list in the plot data view.

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

     setVariables(dataF, frVar)
     resetVarButtonBoxes(frVar)
     setToggleX(j, dataFr)
     setToggleY(j, dataFr)
     setToggleInactive(j, type, dataFr)

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

   dataF: the data set name (a character string)

   frVar: the gtk frame that holds the toggle buttons

       j: the index of the button that just changed state

    type: type is X or Y

  dataFr: the data set name

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

     setVariables calls resetVarButtonBoxes, which removes all old
     toggle  buttons when a new data set is chosen.  setVariables also
     calls  setToggleX and setToggleY, which respectively set the X and
     Y values.   In turn, setToggleX and setToggleY call
     setToggleInactive, which sets  the toggle buttons so only one X
     button and one Y button can be active  at one time.

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

     Elizabeth Whalen

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

     'updateControlWindow', 'setPlotDView'

_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")
         # setPlotDView should be called by the user choosing 'plot data' 
         # under the display menu
         setPlotDView()
         # then choose USArrests from the Loaded Data list and 
         # setVariables will be called to fill in the Data Variables frame
       } 

