

palette {base}                               R Documentation

_S_e_t _o_r _V_i_e_w _t_h_e _G_r_a_p_h_i_c_s _P_a_l_e_t_t_e

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

     View or manipulate the color palette which is used when
     a `col=' has a numeric index.

_U_s_a_g_e_:

     palette(value)

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

   value: an optional character vector.

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

     If `value' has length 1, it is taken to be the name of
     a built in color palette.  If `value' has length
     greater than 1 it is assumed to contain a description
     of the colors which are to make up the new palette
     (either by name or by RGB levels).

     If `value' is omitted or has length 0, no change is
     made the current palette.

     Currently, the only built-in palette is `"default"'.

_V_a_l_u_e_:

     The palette which was in effect.  This is `invisible'
     unless the argument is omitted.

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

     `colors' for the vector of built-in ``named'' colors;
     `hsv', `gray', `rainbow', `terrain.colors',... to con-
     struct colors.

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

     palette()               # obtain the current palette
     palette(rainbow(6))     # six color rainbow

     (palette(gray(seq(0,.9,len=25)))) # gray scales; print old palette
     matplot(outer(1:100,1:30), type='l', lty=1,lwd=2, col=1:30,
             main = "Gray Scales Palette",
             sub = "palette(gray(seq(0,.9,len=25)))")
     palette("default")      # reset back to the default

