Question: How to maintain same color key across multiple heatmaps despite different datasets using heatmap.3
0
gravatar for biohack92
4.6 years ago by
biohack92150
United States
biohack92150 wrote:

I have set the breaks in the color key of heatmap.3 function (http://www.inside-r.org/packages/cran/GMD/docs/heatmap.3):

breaks=seq(0, 1500, by=20)

When plotted, the breaks are maintained but the axis changes depending on the dataset. I understand that symkey and symbreaks options will set the breaks around 0, but is there a way to set the color key to show 0-1500 range? Appreciate any advice.

heatmap.3(x, Rowv=T, Colv=F, col=mycol, RowSideColors=custom.annotation, scale="none", trace="none", dendrogram="row", breaks=breaks, cexRow=1, cexCol=1, key=T, main="Heatmap of raw seq reads", na.rm=TRUE)
heatmap R • 2.7k views
ADD COMMENTlink modified 4.6 years ago • written 4.6 years ago by biohack92150

I might be wrong but I can't find col & RowSideColors in heatmap.3 ( I know these arguments exist in heatmap.2). Also, it might be a good idea to add some more details to the question, show what the objects x, custom.annotation, breaks etc look like. Maybe add an existing plot pointing out what changes you would like. 

ADD REPLYlink written 4.6 years ago by komal.rathi3.5k

Arguments from heatmap.2 are inherited into heatmap.3 as well.

Answer requires manipulating the source code: http://stackoverflow.com/questions/29373430/how-do-you-manually-set-the-heatmap-3-heatmap-2-color-key

ADD REPLYlink written 4.6 years ago by biohack92150
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1343 users visited in the last hour