plotting two heatmaps with the same order of genes I expected the same pattern but here I am not able to compare the patterns as the order of genes does not seem the same. I mean how I can have two heat maps on which the order of genes are the same so I woulds be able to compare the block of yellow and blue colors in two heat maps.
I have used this code
require(&quot;RColorBrewer&quot;)
myCol &lt;- colorRampPalette(c(&quot;dodgerblue&quot;, &quot;black&quot;, &quot;yellow&quot;))(100)
myBreaks &lt;- seq(-2, 2, length.out=101)
heat &lt;- t(scale(t(sc_DEGG)))
hr &lt;- hclust(as.dist(1-cor(t(y), method=&quot;pearson&quot;)), method=&quot;complete&quot;)
heatmap.2(
    heat, 
    Rowv=as.dendrogram(hr), 
    Colv=as.dendrogram(hc), 
    col=myCol, 
    breaks=myBreaks, 
    main=&quot;Title&quot;, 
    key=T, 
    keysize=1.0, 
    scale=&quot;none&quot;, 
    density.info=&quot;none&quot;, 
    reorderfun=function(d,w) reorder(d, w, agglo.FUN=mean), 
    trace=&quot;none&quot;, 
    cexRow=0.2, 
    cexCol=0.8, 
    distfun=function(x) dist(x, method=&quot;euclidean&quot;), 
    hclustfun=function(x) hclust(x, method=&quot;ward.D2&quot;)
)

I  have made a pair of heat maps based on your code in complexheatmap package. The right heat map is lighter than the left one. I don't know which one has been clustered based on the another one. How I can make the right one darker so that both  seem more similar??
ComplexHeatmap is built for plotting side-by-side heat maps with the same clustering - you use the + notation, similar to ggplot2. To use the same example data as @b.nota:
library(ComplexHeatmap)
# First matrix
set.seed(2)
m &lt;- replicate(8, rnorm(26))
rownames(m) &lt;- letters[1:26]

# Second matrix
set.seed(3)
m2 &lt;- replicate(8, rnorm(26))
rownames(m2) &lt;- letters[1:26]

Heatmap(m) + Heatmap(m2)

And the results:

There are lots of examples in the extensive documentation.
EDIT:
Since you have a few genes with high values in the 'T' matrix, they are washing out the colour scheme for the rest of the heatmap. You could set the max to be lower, and accept that those genes will saturate - the resulting heatmap will be less 'honest' about the data, but might capture what you want to see. To change colour scheme requires a call to the colorRamp2 function of the circlize package.
library(circlize)
mycol &lt;- colorRamp2(c(-2,0,2), c(&quot;dodgerblue&quot;, &quot;black&quot;, &quot;yellow&quot;))
Heatmap(m, col=mycol, cluster_columns = FALSE) + 
    Heatmap(m2, col=mycol, cluster_columns = FALSE)

This gives: