palette package:grDevices 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 construct colors. 'colorRamp' to interpolate colors, making custom palettes; 'col2rgb' for translating colors to RGB 3-vectors. _E_x_a_m_p_l_e_s: require(graphics) 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