R-beta: Plotting: numeric 'col' colors; col=0, col=1, .. | Nice "funclet"

Martin Maechler maechler at stat.math.ethz.ch
Mon Jul 14 18:43:30 CEST 1997

>>>>> "Thomas" == Thomas Lumley <thomas at biostat.washington.edu> writes:

    MM>> colors() gives a character vector of length 657 with possible color
    MM>> names.
    MM>> Quite nice; However,
    MM>> 1) how can I find out which of these correspond to col = 2.., K ?
    MM>> 2) Wouldn't it be nice if this map was mutable ?

Excuse me; I wasn't clear enough.

I mean the mapping  colors()  |-->  {Col(i); i=1,..,N}

				   Col(i) = the color that is taken 
					    when I ask for  col = i.
I.e., the mapping I speak of is really equivalent to
      a set of  N indices into colors() -- resulting in the  {Col(1..N)}
      subset of colors().

I did not speak about changing the result of colors(), but rather the above

    Thomas> This map probably shouldn't be mutable.  As far as I can tell
    Thomas> it is just a translation of the official X11 color map (found
    Thomas> in eg /usr/lib/X11/rgb.txt).  These color names are understood
    Thomas> by quite a lot of X software (including the motif() and
    Thomas> openlook() drivers in S-PLUS).
I know and agree. I neither don't  want to change  colors().

-- Martin

[PS: Further discussion should probably be directed
     to  R-devel, instead of  R-help;  ....]
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list