[R] Log color scale
Thomas Lumley
tlumley at u.washington.edu
Mon Jul 31 16:25:54 CEST 2006
On Sun, 30 Jul 2006, Uwe Ligges wrote:
> vincent at 7d4.com 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
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
More information about the R-help
mailing list