home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / rainbow < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.4 KB  |  47 lines

  1.     
  2.     _C_o_l_o_r _R_a_i_n_b_o_w_s
  3.     
  4.          rainbow(n, s=1, v=1, start=0, end=(n-1)/n)
  5.     
  6.     _A_r_g_u_m_e_n_t_s:
  7.     
  8.                 n: the number of colors in the rainbow.
  9.     
  10.               s,v: the ``saturation'' and ``value'' to be used
  11.                    to complete the HSV color descriptions.
  12.     
  13.             start: the (corrected) hue at which the rainbow
  14.                    begins.
  15.     
  16.               end: the (corrected) hue at which the rainbow
  17.                    ends.
  18.     
  19.     _D_e_s_c_r_i_p_t_i_o_n:
  20.     
  21.          This function creates a ``rainbow'' of n colors.
  22.          Equispaced hues in RGB space tend to cluster at the
  23.          red, green and blue primaries.  This function applies
  24.          an ad-hoc correction to diminish the effect of this
  25.          clustering, producing ``visually equispaced'' colors.
  26.     
  27.          Some applications such as contouring require a pallette
  28.          of colors which do not ``wrap around'' to give a final
  29.          color close to the starting one.  The parameters start
  30.          and end can be used to specify particular subranges of
  31.          hues.  The following values can be used when generating
  32.          such a subrange: red=0, yellow=1/6, green=2/6,
  33.          cyan=3/6, blue=4/6 and magenta=5/6.
  34.     
  35.          The values returned by rainbow can be used with a col=
  36.          specification in graphics functions or in par.
  37.     
  38.     _S_e_e _A_l_s_o:
  39.     
  40.          rgb, hsv, gray.
  41.     
  42.     _E_x_a_m_p_l_e_s:
  43.     
  44.          # A Color Wheel
  45.          piechart(rep(1,12), col=rainbow(12))
  46.     
  47.