Re: [R] pheatmap breaks

2016-08-20 Thread Jim Lemon
Hi Adrian, I had to add an extra color, but this might do what you want: chxx<-matrix(runif(100,-3.32,4.422),nrow=10) chxx.cut<-as.numeric(cut(chxx,breaks=c(-3.5,-1.96,-1,0,1,1.96,5))) chxx.col<-c("#FF","#FF","#FF","#FF","#FF",NA)[chxx.cut] library(plotrix) chxx_highcol<-color.

[R] pheatmap breaks

2016-08-19 Thread Adrian Johnson
Hi group: I tried multiple times cannot understand the breaks to work for my heatmap. I am using following way: pheatmap(chxx, cluster_cols=FALSE, annotation_col=annotcols, annotation_colors=anno_colors, col=colorRampPalette(c("dark blue", "white", "#ff"))(34), show_colnames=F) > max(chxx)