Skip to content
Back to formatted view

Raw Message

Message-ID: <429452DC.7050100@statistik.uni-dortmund.de>
Date: 2005-05-25T10:26:36Z
From: Uwe Ligges
Subject: colors and palettes and things...
In-Reply-To: <2088.128.193.139.69.1116862527.squirrel@www.forestinformatics.com>

Jeff D. Hamann wrote:

> After trying to find if there was a color picker in the FAQs and the help,
> I thought I would send a post here. I was overwhelmed with all the
> wonderful color choices R has predefined (discovered after typing in
> colors()) but can't figure out what they all (by name) look like. Is there
> a color picker or some other method to display all those colors next to
> the name?
> 
> I think I can put together palettes, but another question I have then
> regards the building of palettes (a list of variable length I can select
> or create myself other than the ones defined by Palette) so I can pass
> these colors into functions instead of having to predefine a bunch of
> colors myself or use the predefined colors like terrain.colors(n)?
> 
> Are there groups of colors in the colors() that I can group together to
> make some nice palettes for drawing barplots, etc?
> 
> Thanks,
> Jeff.
> 
> 


I'd like to point out some packages or code snippets that might be 
useful for you:

  # base package "grDevices":
  ?colorRamp
  example(colorRamp)

  # CRAN package "colorspace":
  library(help = colorspace)

  # CRAN package "RColorBrewer":
  library(RColorBrewer)
  ?brewer.pal
  example(brewer.pal)

  # see also the last two examples by Martin Maechler in
  # CRAN package scatterplot3d:
  library(scatterplot3d)
  ?scatterplot3d
  example(scatterplot3d)

Uwe Ligges