

   palette {base}                               R Documentation

   SSeett oorr VViieeww tthhee GGrraapphhiiccss PPaalleettttee

   DDeessccrriippttiioonn::

        View or manipulate the color palette which is used when
        a `col=' has a numeric index.

   UUssaaggee::

        palette(value)

   AArrgguummeennttss::

      value: an optional character vector.

   DDeettaaiillss::

        If `value' has length 1, it is taken to be the name of
        a built in color palette.  If `value' has length
        greater than 1 it is assumed to contain a description
        of the colors which are to make up the new palette
        (either by name or by RGB levels).

        If `value' is omitted or has length 0, no change is
        made the current palette.

        Currently, the only built-in palette is `"default"'.

   VVaalluuee::

        The palette which was in effect.  This is `invisible'
        unless the argument is omitted.

   SSeeee AAllssoo::

        `colors' for the vector of built-in ``named'' colors;
        `hsv', `gray', `rainbow', `terrain.colors',... to con-
        struct colors.

   EExxaammpplleess::

        palette()      # obtain the current palette
        palette(rainbow(6)) # six color rainbow

        (palette(gray(seq(0,.9,len=25)))) # gray scales; print old palette
        matplot(outer(1:100,1:30), type='l', lty=1,lwd=2, col=1:30,
                main = "Gray Scales Palette",
                sub = "palette(gray(seq(0,.9,len=25)))")
        palette("default")  # reset back to the default

