I used following code to generate a heatmap using heatmap.2 of R. key="F" gets rid of color key at the top. However the plot does not rescale leaving a blank space on the place previously occupied by the colour key. How do I recenter the plot by getting rid of the blank space at the top?
dImp_heatmap <- heatmap.2(dSet_matrix, Rowv=NA, Colv=NA, col = cm.colors(20), dendrogram="none",trace="none", key="F",margins=c(1,8),colsep=c(1:6),rowsep=(1:62),sepwidth=c(0.05,0.05), sepcolor="white", cellnote=round(dSet_matrix,digits=2),notecol="black",notecex=0.7,scale="column")
Best Answer
If you read the documentation for
?heatplot.2
carefully, you'll see at the bottom of the list of arguments the following:And the details are:
So for example:
and I imagine the setting
lwid
would behave similarly. Although I should add that if you include both dendrograms, then the space in the upper left is necessary to make room for the dendrograms.