**40**wrote:

Hi,

I've got fold change data for samples 1 and 2 from time point t1 to time point t2. I want to create a heat map using pheatmap for subsets of genes (~50-100 per set) but I want to be able to define the colour scale to be the same for all.

At the moment, R picks the range based on the highest fold change e.g.

Heat map 1: this subset has a 200 fold upregulation but no downregulation so 0 is blue and +200 is red.

Heat map 2: this subset has 100 fold down regulation in one gene and only 2 fold upregulation for another, so the range will be -100 is blue and +2 is red.

Is there a way that I can say +200 is always red and -100 is always blue and keep this range for all heat maps?

Thanks.

**600**• written 4.2 years ago by as9309 •

**40**

From the manual: https://cran.r-project.org/web/packages/pheatmap/pheatmap.pdf, I think you can use the breaks option.

600