[R] Suggested color schemes for points, not regions?
ihaka at stat.auckland.ac.nz
Mon Nov 8 02:01:26 CET 2004
kwright at eskimo.com wrote:
> I have seen a couple of posts about color schemes like those at the
> ColorBrewer site. Most recently:
> These color schemes can work very well for regions (bars, polygons,
> images, etc.) but are not very suitable for points and/or lines.
> Is anyone aware of research/suggestions for a color scheme to use for
> scatter plots? I've looked at great length and have found little on this
> My current scheme of choice is a set of fairly saturated colors along the
> lines of:
> medium green
> This is similar to the 'paired' color scheme, but using only the saturated
> colors and substituting black for yellow. Depending on circumstances, I
> sometimes use a different glyph for each color. The hard part about all
> this is to make sure that each color/glyph combination has the same
> 'attention-getting' power.
> Any discussion or comments are welcome.
> Kevin Wright
First a warning. The use of ColorBrewer type color schemes is
inappropriate for many statistical displays -- eg. barplots
piecharts, mosaic plots. The problem is that the colors in
the schemes vary a lot in luminance and there is a size illusion
associated with luminance variation. (See Cleveland and McGill
(1983). "A Color-Caused Optical Illusion on a Statistical Graph,"
The American Statistician, 37:2 101-105.) Varying luminance
in graphs which represent values as length or area can distort
the perception of the encoded values.
For line and glyph colors the size illusion is not as much
of a problem and it's probably best to concentrate on visibility.
The ISO 9241 standard recommends a luminance difference of at
least 3:1 and preferably 10:1 between text and its background.
Something similar probably applies here, and that severely limits
the color choices available (you need quite dark colors on
a white background).
One way around this is to draw a black border around
the line or glyph. You can do this for glyphs by using a pch
value between 21 and 25 and using bg= in the base graphics or
fill= in grid. Alternatively you can roll your own with
polygon (we need a better alternative to this). For lines
you can draw them twice, superimposing a colored line on top
of a black one - e.g.
There are simultaneous contrast issues with this, but mucking
about with the lwd values will generally get you a reasonable
I think this is a pretty interesting area and there is an
opportunity for someone to look at the perceptual questions
Ross Ihaka Email: ihaka at stat.auckland.ac.nz
Department of Statistics Phone: (64-9) 373-7599 x 85054
University of Auckland Fax: (64-9) 373-7018
Private Bag 92019, Auckland
More information about the R-help