Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ggplot: recommended colour palettes also distinguishable for B&W printing?

Tags:

r

ggplot2

I've started to produce the charts for a paper. For some of them which are bar charts I've used the "Pastel1" palette (as recommended in the book on ggplot2, pastel colours are better than saturated ones for fill areas, such as bars).

The problem with Pastel1 at least is that when printed on a B&W laser printer, the colours are indistinguishable. I don't know if the readers will view the paper on screen or will print it on B&W, so I'm looking for either of the following:

  • how to add hash lines to a palette such as Pastel1 (hopefully the hash lines are also subtle)
  • a colour palette easy on the eyes that also produces distinct grey areas for B&W for, say, up to 3-4 different colours.

Granted, I could find the latter by experimenting and using toner, but perhaps this has already been solved, I suppose it's a common problem. And yes, I did google for this, but didn't find anything pertinent.

Thank you.

like image 939
wishihadabettername Avatar asked Sep 08 '10 03:09

wishihadabettername


3 Answers

Use http://colorbrewer2.org/ and only show colour schemes that are printer friendly. Also see scale_fill_grey.

Currently it's not possible to used hash lines due to a limitation in the underlying grid drawing package.

like image 119
hadley Avatar answered Nov 13 '22 13:11

hadley


There is the col2grey function in the TeachingDemos package that will convert a set of colors to an approximation of the grey color that will result from printing. You can use this to try different pallettes without wasting toner/paper.

like image 35
Greg Snow Avatar answered Nov 13 '22 14:11

Greg Snow


Use this to select another color combination (gray scale option included)

like image 3
George Dontas Avatar answered Nov 13 '22 13:11

George Dontas