[R] Colormap that look good in gray scale

Greg Snow Greg.Snow at imail.org
Wed Mar 4 21:08:04 CET 2009


This does not fully answer your question, but there is a function col2grey (or col2gray) in the TeachingDemos package that will help you see what a given color plot will look like (approximately) when printed/photocopied in grayscale.

For your example you would do something like:

> plot(1:6,col=col2grey(c(1,7,5,3,2,4)),pch=c(1,20,20,20,20,20))

To view the grayscale version of the plot, then try with different colors until you are happy with the results.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of thibert
> Sent: Wednesday, March 04, 2009 11:23 AM
> To: r-help at r-project.org
> Subject: [R] Colormap that look good in gray scale
> 
> 
> Hi,
>    I am looking for a colormap (in color) that look like a gradient in
> gray
> scale. It is to allow people without color printer to print the color
> graph
> and have something meaningful in gray scale.
> 
> It can be something like this
> plot(1:6,col=c(1,7,5,3,2,4),pch=c(1,20,20,20,20,20))
> but with an arbitrary number of different colors, not just six.
> 
> Thanks
> --
> View this message in context: http://www.nabble.com/Colormap-that-look-
> good-in-gray-scale-tp22336097p22336097.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list