addColorScheme            package:Rggobi            R Documentation

_A_d_d_s _a _c_o_l_o_r _s_c_h_e_m_e _t_o _a _G_G_o_b_i _i_n_s_t_a_n_c_e _o_r _t_h_e _g_l_o_b_a_l _c_o_l_o_r
_s_c_h_e_m_e _l_i_s_t.

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

     This takes an R color scheme description and adds an equivalent
     representation to either the color schemes available to a
     particular GGobi instance or to the global list of color schemes
     within a GGobi session.

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

     addColorScheme(scheme, name, overwrite=FALSE, set=FALSE, .gobi=NULL)

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

  scheme: the 'ColorScheme' object. 

    name: the name to identify/describe the scheme.

overwrite: a logical value indicating whether we should replace any
          existing entry with this name with the new scheme ('TRUE'),
          or simply append the new scheme to the end of the list.

     set: a logical value that indicates whether to also make this the
          active color scheme. See 'setActiveColorScheme'.

   .gobi: the GGobi instance to which to append the new color scheme,
          or if this is 'NULL', the color scheme is added to the
          session options and will be available to new GGobi instances
          created after this.

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

     The index/position in the appropriate list of color schemes to
     which the new scheme was added.

_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:

     'setActiveColorScheme' 'getColorSchemes'

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

      data(mtcars)

      g = ggobi(mtcars)
      cs = getColorSchemes()
      cs[[1]]@name
      addColorScheme(cs[[1]], "Debby")

      g = ggobi(mtcars)
      cs.new = getColorSchemes()
      length(cs.new) == length(cs) + 1

       
      g = ggobi(mtcars)
      cs = getColorSchemes()[[1]]
      addColorScheme(cs, "Duncan", .gobi = 1)

