IDPcolorRamp             package:IDPmisc             R Documentation

_C_o_l_o_r _R_a_m_p _f_o_r _O_r_d_e_r_e_d _V_a_l_u_e_s

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

     Produces color ramps which change simultanously hues, saturation
     and values as defined in the 'hsv' modus. This allows to produce
     especially smooth transitions from one color to the next. The
     default color ramp starts with light blue, continues with green,
     yellow, red and ends with dark violet.

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

     IDPcolorRamp(n,
                  colInt = data.frame(h = c(0.47, 0.28, 0.16, 0, 1, 0.8),
                                      s = c(0.31, 0.55, 0.7, 0.8, 0.8, 1),
                                      v = c(1, 1, 1, 1, 1, 0.4)),
                  fr = c(0.27, 0.27, 0.27, 0))

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

       n: Total number of different colors in color ramp.

  colInt: Data.frame or matrix with the columns h,s & v which defines
          the Intervals for individual color subramps, with
          nrow(colInt) = nsr+1 with nsr>1. See details

      fr: Fraction of the colors in each of the first nsr-1 subramps.

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

     The function distributes the number of colors in the subramps,
     given the fractions fr, as smoothly as possible. There is at least
     one color in the first and the last subramp.
      Definition of hsv code:

     '_h' Hue of hsv-Signal: 0=red, 1/3=green, 2/3=blue, 1=red.

     '_s' Saturation of hsv-Signal: 0=white, 1=full color.

     '_v' Value of hsv-Signal: 0=black, 1=full color.

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

     A vector of 'n' colors.

_N_o_t_e:

     If there are subramps which are not adjacent in the color space
     (as is here the case for red and violet), you need a virtual
     subramp (here from h=0.00 to h=1.00) with corresponding fraction
     fr == 0.

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

     Rene Locher

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

     'showColors', 'colorRamp', 'ColorBrewer'

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

     IDPcolorRamp(10)

