reduce width of columns on a heatmap.2 plot

*爱你&永不变心* 提交于 2019-12-23 06:35:09

问题


I have a 331*9 double matrix (named expr001). It looks like this:

row.names     Col1      Col2      Col3      Col4      Col5      Col6    Col7       Col8      Col9
17211382  7.397439  7.377975  7.299997  8.192889  8.292300  8.092921  8.178948  8.120986  8.276824
17211752  9.115307  9.116741  9.113366  8.423073  8.458392  8.573309  8.773752  8.614159  8.592105
17212229  5.968911  6.060437  6.059898  5.595364  5.471327  5.538794  5.584753  5.518935  5.498830
17215629  8.641765  8.810358  8.770533  7.482992  7.732727  7.811839  8.582255  8.404402  8.357516
17215820 11.495858 11.605611 11.529879 11.124909 11.107311 11.179045 11.165894 11.188668 11.210991

And I am generating a heatmap using heatmap.2

heatmap.2(expr001,main="\n331 Genes : P.adj<0.01",cexCol=0.9,tracecol=NULL,col="bluered")

I get the plot below:

How can I reduce the width of the columns? Any suggestions?


回答1:


Try pheatmap package. There you can control the size of the the cells more conveniently, with arguments cellwidth and cellheight. Even if your plot becomes too big this way and does not fit into the plotting window, then by using argument filename you can write it into file with correct measurements.



来源:https://stackoverflow.com/questions/18859692/reduce-width-of-columns-on-a-heatmap-2-plot

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