Skip to content
Prev 152567 / 398500 Next

colouring a tree

On Thu, 2008-08-07 at 16:15 +0300, Monna Nyg?rd wrote:
...
In order to run the example, we'll need some data, even if it is made
up.

I think you can get the values you want like this:

x<-ceiling(x/100)
If you want to make colors darker, you can do something like this:

darkenColor<-function(col,colorshift=0.75) {
 rgbmat<-col2rgb(col)
 ncol<-dim(rgbmat)[2]
 rgbmat<-rgbmat*colorshift
 return(rgb(rgbmat))
}

This will darker your colors toward black.

Jim