Re: [R] Changing colours for heatmap plot

2015-06-06 Thread Jim Lemon
Hi John, As heat.colors is a function that returns a vector of colors specified by the "n" argument, you could write something like this: my_custom_colors<-function(n,color_vector="lightgray") return(rep(color_vector,length.out=n))) and then pass the desired color vector to it: green_n_black<-c(

[R] Changing colours for heatmap plot

2015-06-05 Thread John Wasige
​Dear community, Could somebody help on how I can change the colour for this plot in the heatmap plot script below to something like c("green", "green", "black", "green", "green", "black", "black", "green", "green", "black"): ## library(gplots) library(lattice) ### loading data data <- read.