setColors.ggobi            package:Rggobi            R Documentation

_A_c_c_e_s_s _c_o_l_o_r _a_n_d _h_i_d_d_e_n _a_t_t_r_i_b_u_t_e_s _o_f _r_e_c_o_r_d_s.

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

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

     setColors.ggobi(colors, which = 1:length(colors), .data=1, .gobi=getDefaultGGobi())
     getColors.ggobi(which, .data=1, .gobi=getDefaultGGobi())
     setHiddenCases.ggobi(vals, which = 1:length(vals), .data = 1, .gobi=getDefaultGGobi())
     getHiddenCases.ggobi(.data = 1, .gobi=getDefaultGGobi())

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

  colors: color identifiers, either indices into the color map, or
          names of entries in the color map.

    vals: logical vector giving the settings for the records identified
          in the parallel vector of indices 'which'.

   which: the indices of the records for which the color should be set.
          This vector is used in parallel with the 'colors' argument.
          The i-th element of colors is applied to the record
          identified by the i-the element of 'which'.

   .data: the identifier for the dataset whose records are to be  set
          or queried. This can be an integer, name/string or an object
          of class 'ggobiDataset'.

   .gobi: the ggobi instance identifier. This is used to resolve the
          dataset and is unecessary if an object of class 
          'ggobiDataset' is  supplied for the '.data' argument.

_V_a_l_u_e:

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

     Duncan Temple Lang

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.ggobi.org>

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

     'getGlyphs.ggobi'

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

       g <- ggobi(system.file("data", "flea.xml", package="Rggobi"), args="-noinit")
       g$getColors()
       g$setColors(rep(2, 74), which=1:nrow(g[[1]]))

        # now highlight a subset of the points
       g$setColors(rep(1, 74), which=1:32)

     ## Not run: 
     # Update
        # Set the first 30 records to blue.
       g$setColors(rep("blue",30))  # no colornames for the moment

        # Set the colormap and then set the 
        # points.
       m <- g$getColorMap()
       m["green", 1] <- .5
       g$setColorMap(m)
       g$setColors(rep("green",30))
     ## End(Not run)

