showColors              package:IDPmisc              R Documentation

_D_i_s_p_l_a_y_s _v_e_c_t_o_r_s _o_f _c_o_l_o_r_s

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

     Displays colors produced by a color vector 'col' and labels them
     by the corresponding number of the element of 'col'.

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

     showColors(col = IDPcolorRamp(20),
                ntm = min(length(col), 20),
                border = TRUE)

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

     col: Color vector

     ntm: Approximate number of tick marks for axis

  border: Shall border be drawn between the colors in the legend:
          'TRUE' / 'FALSE'

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

     Rene Locher

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

     'IDPcolorRamp', 'show.colors' 'colorRamp', 'ColorBrewer'

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

     showColors(IDPcolorRamp(5))
     showColors(IDPcolorRamp(200),border=FALSE)
     showColors(IDPcolorRamp(200),border=FALSE,ntm=5)

     showColors(IDPcolorRamp(4,
                             colInt = data.frame(
                                 h = c(0.47, 0.28, 0.22, 0.2, 0.00), 
                                 s = c(0.3, 0.55, 0.75, 0.75, 0.75),
                                 v = c(1, 1, 1, 1, 1)),
                             fr     = c(0.2,0.2,0.2))
                ,border=FALSE)

     showColors(IDPcolorRamp(200,
                             t(col2hsv(c("darkviolet","blue",
                                         "green","yellow","red"))),
                             fr=rep(0.25,3)),border=FALSE)

