Currently, heat.colors gives the following code: R> heat.colors(4) [1] "#FF0000" "#FF7F00" "#FFFF00" "#FFFF7F" R> heat.colors(5) [1] "#FF0000" "#FF5400" "#FFA900" "#FFFF00" "#FFFF7F" R> heat.colors(6) [1] "#FF0000" "#FF3F00" "#FF7F00" "#FFBF00" "#FFFF00" "#FFFF7F" R> heat.colors(7) [1] "#FF0000" "#FF3300" "#FF6600" "#FF9900" "#FFCC00" "#FFFF00" "#FFFF7F" That means, the distance between the last color and the last color but one stays the same (7F), whereas the distances between other adjacent colors drops with the number of coloros from 7F to 33. The code for heat.colors(n) looks like j <- n%/%4 i <- n - j c(rainbow(i, start = 0, end = 1/6), if (j > 0) hsv(h = 1/6, s = seq(from = 1 - 1/(2 * j), to = 1/(2 * j), length = j), v = 1)) If for example, n=16, j=4, i=12. That is, for the first 12 colors the interval "#FF0000" to "#FFFF00" is divided into 12 pieces, for the last 4 colors an interval of the same length "#FFFF00" to "#FFFFFF" is only divided into 4 pieces. Does this really provide n ``contiguous'' colors or are the first 12 colors closer together than the last 4? Andreas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._