R-alpha: R color problem (col=0 is wrong; col=1 S incompatible)
Martin Maechler <firstname.lastname@example.org>
Wed, 6 Aug 1997 15:54:56 +0200
>>>>> "Kurt" == Kurt Hornik <email@example.com> writes:
Kurt> There seems to be a small problem with the S-compatible small
Kurt> numbers color specification, colors 0 and 2 are the same.
Kurt> Have a look at e.g. barplot(rbind(1:3, 1), col = c(0,2))
I had reported this problem even more extensively in R-help (not R-devel),
since I thought it important to be known by everyone:
Here is the relevant part (in R-help, I went further with a wish...):
MM> Date: Mon, 14 Jul 1997 15:07:19 +0200
MM> From: Martin Maechler <firstname.lastname@example.org>
MM> To: Remail@example.com
MM> Subject: R-beta: Plotting: numeric 'col' colors; col=0, col=1, ..
MM> ``We all know''
MM> that R has more flexible and nicer color specifications than S-plus.
MM> There are situations however, where I'd like to specify colors numerically,
MM> 1) convenience of using different colors in a for(.) loop
MM> 2) backward compatibility with S.
MM> In S, there's the quite known ``standard''
MM> col = 0 :<==> current background color [ = white by default]
MM> col = 1 :<==> current foreground color, ie. default color. [ = black]
MM> In R, this is currently different:
MM> col = 0 is the same as col = 2
MM> which maybe rather an accident than anything else.
MM> col = 1 however takes a different color than the current foreground
MM> -- which can be NICE in certain situations, where we'd rather have
MM> points / lines in a different color than the default foreground
MM> On the other hand, I think "S compatibility" is more important here.
MM> I assume that it's not too hard to change the
MM> ``numeric color'' map such as to get S compatibility.
Yes, I still think it would be nice if this was changed...
r-devel 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: firstname.lastname@example.org