[R] repeating colors in graph 2

Thomas Lumley tlumley at u.washington.edu
Fri Oct 24 15:47:14 CEST 2003


On Fri, 24 Oct 2003, James MacDonald wrote:

> Hmmm, I get the same results either way. Regardless of results, is there
> a reason why my suggestion is 'invalid'?
>

Well, it does work, but palette() is designed to set or report the current
palette, so it makes more sense to do either
  palette(rainbow(13))
  plot(1:13, col=1:13)
or
  plot(1:13, col=rainbow(1:13))


	-thomas




More information about the R-help mailing list