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. Thanks Laura
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. > Thanks > LauraSee ?hsv. If you need more sophisticated stuff, you might want to try out the package "RColorBrewer". Uwe Ligges
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.The colour is selected linearly by the value you are drawing. Hence two solutions present themselves: one, non-linearly scale your data. for your application I think squaring x-mean(x) might stretch out the tails. two, constructing a non-linearly varying palette. you can do this by mucking about with the red, green, and blue values from the palette. the functions 'col2rgb' and 'rgb' are useful. Baz
See also ?pallete with which you can make your pallete be anything you want. The examples given there will point you to several pre-defined palletes. Perhaps one of them will do a better job for you than whatever you're trying now. rainbow(n, s = 1, v = 1, start = 0, end = max(1,n - 1)/n, gamma = 1) heat.colors(n) terrain.colors(n) topo.colors(n) cm.colors(n) -Don At 1:08 PM +0100 6/14/04, 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. >Thanks >Laura > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html-- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA
On Mon, 14 Jun 2004 07:14:46 -0700, Don MacQueen <macq at llnl.gov> wrote :>See also > > ?palleteTypo: it should be ?palette. Duncan Murdoch
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