kwright@eskimo.com
2004-Nov-03 16:06 UTC
[R] Suggested color schemes for points, not regions?
I have seen a couple of posts about color schemes like those at the ColorBrewer site. Most recently: http://geography.uoregon.edu/datagraphics/color_scales.htm 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 topic. My current scheme of choice is a set of fairly saturated colors along the lines of: navy brown/orange black purple red 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
Martin Maechler
2004-Nov-04 09:39 UTC
[R] Suggested color schemes for points, not regions?
>>>>> "KevinW" == Kevin Wright <kwright at eskimo.com> >>>>> on Wed, 3 Nov 2004 08:06:59 -0800 (PST) writes:KevinW> I have seen a couple of posts about color schemes like those at the KevinW> ColorBrewer site. Most recently: KevinW> http://geography.uoregon.edu/datagraphics/color_scales.htm KevinW> These color schemes can work very well for regions (bars, polygons, KevinW> images, etc.) but are not very suitable for points and/or lines. Are you sure? Currently, for R users, the most accessible of the "new" schemes is the ColorBrewer (http://colorbrewer.org) one, since Erich Neuwirth and others have been providing the RColorBrewer package on CRAN. install.packages("RColorBrewer") library("RColorBrewer") example(brewer.pal) # a 'show' not only has schemes to be used for images/maps, but also "Set"s of (pairwise well distinguishable) colors well suited for scatter plots. In Cynthia Brewer's terminology these are the "qualitative" schemes. KevinW> Is anyone aware of research/suggestions for a color KevinW> scheme to use for scatter plots? I've looked at KevinW> great length and have found little on this topic. KevinW> My current scheme of choice is a set of fairly KevinW> saturated colors along the lines of: KevinW> navy KevinW> brown/orange KevinW> black KevinW> purple KevinW> red KevinW> medium green KevinW> This is similar to the 'paired' color scheme, but KevinW> using only the saturated colors and substituting KevinW> black for yellow. Depending on circumstances, I KevinW> sometimes use a different glyph for each color. The KevinW> hard part about all this is to make sure that each KevinW> color/glyph combination has the same KevinW> 'attention-getting' power. hmm, from the above I tend to read that you've already looked at (e.g.) 'Set1' or 'Dark2' colors from ColorBrewer but didn't like them? Something that hasn't been properly considered by statisticians AFAIK is the situation for color blind people, or at least the most common one. This has just been brought up here two days ago, see e.g. https://stat.ethz.ch/pipermail/r-help/2004-November/058724.html which mentions new "color ramp" facilities in the future R 2.1.0 (2005-04-0x). Cynthia Brewer and many others also mention and recommend http://www.vischeck/com/ which allows checking your image/drawing. There's a simulator trying show how a given picture is seen by (even different kinds of) color deficient persons. The colorbrewer.org site has a very nice tool (based on flash 5 plugin), which shows you the pros and cons of a color scheme you chose (interactively). She (Cynthia Brewer) uses 6 criteria (with 3 levels "ok", "doubtful/unknown", "not ok"): 1) Color blind friendly [the "red-green" deficiency] 2) Photocopy friendly [for B&W photocopying: are differences preserved?] 3) LCD Projector friendly [pastel colors may be problematic] 4) Laptop (LCD) friendly 5) CRT-(screen) friendly 6) Color Printing friendly>From the 8 qualitative schemes,- 5 (of 8) were "not ok" for color blinded. - each had at least one "not ok"; i.e., there's no "optimal color scheme" that works everywhere, but you have to change color schemes depending on the intended medium. KevinW> Any discussion or comments are welcome. I'm pretty sure Ross Ihaka will also chime in here. (http://www.stat.auckland.ac.nz/~ihaka/colour/ is a first start). As you see, I'm quite interested also. Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <><
kwright at eskimo.com wrote:> I have seen a couple of posts about color schemes like those at the > ColorBrewer site. Most recently: > http://geography.uoregon.edu/datagraphics/color_scales.htm > > 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 > topic. > > My current scheme of choice is a set of fairly saturated colors along the > lines of: > navy > brown/orange > black > purple > red > 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 WrightFirst 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. lines(x,y,lwd=3) lines(x,y,lwd=1,col="yellow") There are simultaneous contrast issues with this, but mucking about with the lwd values will generally get you a reasonable result. I think this is a pretty interesting area and there is an opportunity for someone to look at the perceptual questions involved. -- 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 New Zealand