[Rd] Palette functions in grDevices

Robert W. Johnstone rjohnsto at sfu.ca
Sat Jan 14 00:59:22 CET 2006


Hello,

1) I would like to add three function to the file colorstuff.R in the
grDevices package.  These functions would be:

   red.colors <- function(n, start = 0.3, end = 0.9, gamma = 2.2)
   green.colors <- function(n, start = 0.3, end = 0.9, gamma = 2.2)
   blue.colors <- function(n, start = 0.3, end = 0.9, gamma = 2.2)

As you can see, these are simply analogs of the function grey.colors, and
would be useful for image processing code done in R.  This would be a
simple change, with little impact on existing code.

Documentation for the three new functions would be added to gray.colors.Rd.

I could make the necessary changes, and would volunteer to make the
changes, but don't have SVN access.

2) Can someone explain the origin of the naming system for these
functions?  I would have thought function names such as palette.terrain,
palette.gray, palette.heat, etc. would be more obvious to users.

A change such as this would obviously be more intrusive, but could be
easily accomplished over a transition period.  The old function names
could be depreciated, while still pointing to the correct code.

Thank-you,

----------------------------------------
Robert Johnstone
Simon Fraser University
http://www.sfu.ca/~rjohnsto/



More information about the R-devel mailing list