home *** CD-ROM | disk | FTP | other *** search
-
- _C_o_l_o_r _R_a_i_n_b_o_w_s
-
- rainbow(n, s=1, v=1, start=0, end=(n-1)/n)
-
- _A_r_g_u_m_e_n_t_s:
-
- n: the number of colors in the rainbow.
-
- s,v: the ``saturation'' and ``value'' to be used
- to complete the HSV color descriptions.
-
- start: the (corrected) hue at which the rainbow
- begins.
-
- end: the (corrected) hue at which the rainbow
- ends.
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- This function creates a ``rainbow'' of n colors.
- Equispaced hues in RGB space tend to cluster at the
- red, green and blue primaries. This function applies
- an ad-hoc correction to diminish the effect of this
- clustering, producing ``visually equispaced'' colors.
-
- Some applications such as contouring require a pallette
- of colors which do not ``wrap around'' to give a final
- color close to the starting one. The parameters start
- and end can be used to specify particular subranges of
- hues. The following values can be used when generating
- such a subrange: red=0, yellow=1/6, green=2/6,
- cyan=3/6, blue=4/6 and magenta=5/6.
-
- The values returned by rainbow can be used with a col=
- specification in graphics functions or in par.
-
- _S_e_e _A_l_s_o:
-
- rgb, hsv, gray.
-
- _E_x_a_m_p_l_e_s:
-
- # A Color Wheel
- piechart(rep(1,12), col=rainbow(12))
-
-