resize and adjust the heatmap in heatmap.2

女生的网名这么多〃 提交于 2019-12-19 05:57:30

问题


I've generated a heatmap like this:

The X-axis and Y-axis labels don't show completely. My code is here:

 heatmap.2(x,col=blueyelred,colsep=c(1:6),rowsep=(1:62), 
           sepwidth=c(0.05,0.05), sepcolor="white", trace="none",
           Rowv=F,Colv=F, scale="none", dendrogram="none",key=F, 
           lhei = c(0.05,5),margins=c(1,8))

Is there any way to adjust it.

Thanks! Cam


回答1:


A few tips:

  • to reduce the font size, use the cexRow and cexCol arguments, e.g.

    heatmap.2(x, ...., cexRow=0.5)
    
  • Adjust the values in the hlei and margins arguments.




回答2:


I see that you are already using the margins parameter, what if you just modify the arguments as @csgillespie suggested?

e.g., margins = c(8, 8)

Maybe also modifying the general plot margins before calling the heatmap() function could help

e.g., par(mar=c(10,4,4,2))

or for the outer margin

par(oma=c(10,4,4,2))

where par(mar=c(bottom,left,top,right))



来源:https://stackoverflow.com/questions/18347702/resize-and-adjust-the-heatmap-in-heatmap-2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!