[R] adjusting color palette
Thomas Lumley
tlumley at u.washington.edu
Mon Jun 14 16:39:36 CEST 2004
On Mon, 14 Jun 2004, Laura Quinn wrote:
> Is there a way to increase the "sensitivity" of the color palette in order
> to more clearly represent certain sections of data? For example I am
> wanting to clearly differentiate between height data for a rolling
> landscape but because of the extremes of the dataset (sea and mountain
> tops), the bulk of the landscape is shaded in closely approximating green
> - i have attempted to do this by using a larger color palette but this
> doesn't make things any clearer.
It sounds as though you are using topo.colors() to generate the palette.
Perhaps the simplest approach is to generate a large palette and then
subsample from it.
Eg topo.colors(20)[c(1:5,7,9,11,13,15:20)]
will produce more widely spaced colors in the middle of the palette.
-thomas
More information about the R-help
mailing list