

hsv {base}                                   R Documentation

_H_S_V _C_o_l_o_r _S_p_e_c_i_f_i_c_a_t_i_o_n

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

     hsv(h=1, s=1, v=1, gamma=1)

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

   h,s,v: numeric vectors of values in the range `[0,1]' for
          ``hue'', ``saturation'' and ``value'' to be com-
          bined to form a vector of colors.  Values in
          shorter arguments are recycled.

   gamma: a ``gamma correction'', see ...

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

     This function creates a vector of ``colors'' corre-
     sponding to the given values in HSV space.  The values
     returned by `hsv' can be used with a `col=' specifica-
     tion in graphics functions or in `par'.

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

     `rainbow', `rgb', `gray'.

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

     hsv(.5,.5,.5)

     ## Look at gamma effect:
     n <- 20;  y <- -sin(3*pi*((1:n)-1/2)/n)
     op <- par(mfrow=c(3,2),mar=rep(1.5,4))
     for(gamma in c(.4, .6, .8, 1, 1.2, 1.5))
       plot(y,axes=F,frame.plot=T,xlab="",ylab="",pch=21,cex=30,
            bg = rainbow(n, start=.85, end=.1, gamma = gamma),
            main = paste("Red tones;  gamma=",format(gamma)))
     par(op)

