[Rd] new function: showcolors {base}

Duncan Murdoch dmurdoch@pair.com
Fri Jan 24 13:07:04 2003


On Fri, 24 Jan 2003 10:22:09 +0100, you wrote:

>I propose to add a function that allows
>to display colors selected by a text pattern
>or by color vectors in a plot.
>

That's a nice function.  I'd suggest some small changes:

1.  Return the vector of colour names (invisibly), and have a plot =
TRUE argument to control whether the plot is drawn or not, i.e.
  reds <- showcolors("red", plot = FALSE) would be just a grep of the
colour list.

2.  Change the description of the pie = FALSE option to say it
displays "lines", not "bars", or add a separate "lines" option.
Otherwise it's not obvious that lty would do anything.

Duncan Murdoch