setColor               package:iSPlot               R Documentation

_S_e_t_s _t_h_e _c_o_l_o_r _f_o_r _c_o_l_o_r_i_n_g _p_o_i_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     setColor sets the color when the callback function is to color
     points. setColor provides the same functionality that is normally
     available through a color browser when the user is using the GUI. 
     Thus, the setColor function is a command line function that is
     only meant to be called when the user is not using the GUI.

_U_s_a_g_e:

     setColor(newColor)

_A_r_g_u_m_e_n_t_s:

newColor: A character string referring to a color (can either be a
          string like "blue" or can be a return value from the rgb
          function 

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_S_e_e _A_l_s_o:

     'setCallFunc',  'rgb', 'getColor'

_E_x_a_m_p_l_e_s:

       if (interactive())
       {
         loadData("USArrests")
         setActiveMVC("USArrests")
         createSPlot(varx="Murder", vary="Assault")
         setCallFunc("leftButtonClick", "color a point")
         setColor(rgb(0,1,0)) 
         # now left click on a point in the plot 
       }

