[R] Changing colours for heatmap plot
    John Wasige 
    johnwasige at gmail.com
       
    Fri Jun  5 14:33:49 CEST 2015
    
    
  
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.csv('D:/Londa/MyData.csv')
rowcolNames <- list(as.character(1980:2009), month.abb)
air_data <- matrix(data ,
                   ncol = 12,
                   byrow = TRUE,
                   dimnames = rowcolNames)
print(levelplot(air_data,
                col.regions=heat.colors,
                xlab = "year",
                ylab = "month",
                main = "New #1"))
##########
Thanks for your help
John
	[[alternative HTML version deleted]]
    
    
More information about the R-help
mailing list