[R] Colormap that look good in gray scale

2009-03-04 Thread thibert
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

Re: [R] Colormap that look good in gray scale

2009-03-04 Thread Achim Zeileis
On Wed, 4 Mar 2009, thibert wrote: 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

Re: [R] Colormap that look good in gray scale

2009-03-04 Thread Greg Snow
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of thibert Sent: Wednesday, March 04, 2009 11:23 AM To: r-help@r-project.org Subject: [R] Colormap that look good in gray scale Hi, I am looking for a colormap (in color

Re: [R] Colormap that look good in gray scale

2009-03-04 Thread thibert
Thanks, Here is my partial solution, from what you suggested me: library(TeachingDemos) z-colors() zz-col2grey(z) #index sorted zzz-sort(zz,index.return = TRUE)$ix x-z # colors in order or their greyscale y-z # greyscale sorted in gradient for (i in 1:length(z)){ x[i]-z[zzz[i]]