Re: [R] Log color scale

From: Thomas Lumley <>
Date: Tue 01 Aug 2006 - 00:25:54 EST

On Sun, 30 Jul 2006, Uwe Ligges wrote:

> wrote:
>> Kartik Pappu a écrit :
>>> However I need to plot my data in a log transformed color scale. Is
>>> this possible? I will be happy to explain further, but basically I
>>> need to do this because there are large variations in the max and min
>>> values of my raw data and I am trying to highlight the differences in
>>> the values at the lower end of my raw data (while still displaying the
>>> values at the high end of the spectrum for comparison) so if figured
>>> the best way to represent this on a (RGB) color scale is to do it with
>>> a log transform. I do not want to use too many colors because that
>>> make the figure too busy.
>>> Any suggestions on how to achieve this.

>> Don't use too much time to search a good palette, build it yourself.
> It is worth looking into the packages "RColorBrewer" and "colorspace".
> Some people thought about colors in graphics and wrote some code that
> might result in more appropriate colors and palettes than those that are
> quickly hacked...

colorRampPalette() will interpolate between colors (eg those from one of the ColorBrewer palettes) and has a bias= argument to make the colors closer together at one end of the scale.


Thomas Lumley			Assoc. Professor, Biostatistics	University of Washington, Seattle

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue Aug 01 01:48:30 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 01 Aug 2006 - 02:17:08 EST.

Mailing list information is available at Please read the posting guide before posting to the list.