[R] colour palette for positive/negative range

2011-03-18 Thread Frank Schwach
Hi, I'm plotting a heatmap with values ranging from -10 to +10 and I would like the negative values to show up in shades of blue and the positive ones in shadea of red. Basically, I want exactly what the RColorBrewer palette RdBu does but with more of a gradual change (the RdBu can only give me

Re: [R] colour palette for positive/negative range

2011-03-18 Thread Barry Rowlingson
On Fri, Mar 18, 2011 at 3:37 PM, Frank Schwach f...@sanger.ac.uk wrote: Hi, I'm plotting a heatmap with values ranging from -10 to +10 and I would like the negative values to show up in shades of blue and the positive ones in shadea of red. Basically, I want exactly what the RColorBrewer

Re: [R] colour palette for positive/negative range

2011-03-18 Thread Kevin Wright
Some ideas for you... RedWhiteBlue - colorRampPalette(c(firebrick,white,#023868)) RedGrayBlue - colorRampPalette(c(firebrick, lightgray, #023868)) RedWhiteBlue2 - colorRampPalette(c(red,white,blue)) RedGrayBlue2 - colorRampPalette(c(red, lightgray, blue)) pie(rep(1,21), col=RedWhiteBlue(21))

Re: [R] colour palette for positive/negative range

2011-03-18 Thread Achim Zeileis
On Fri, 18 Mar 2011, Frank Schwach wrote: Hi, I'm plotting a heatmap with values ranging from -10 to +10 and I would like the negative values to show up in shades of blue and the positive ones in shadea of red. Basically, I want exactly what the RColorBrewer palette RdBu does but with more of

Re: [R] colour palette for positive/negative range

2011-03-18 Thread Frank Schwach
brilliant, thanks guys! diverge_hsv is perfect. Frank On Fri, 2011-03-18 at 16:47 +0100, Achim Zeileis wrote: On Fri, 18 Mar 2011, Frank Schwach wrote: Hi, I'm plotting a heatmap with values ranging from -10 to +10 and I would like the negative values to show up in shades of blue and