减少heatmap.2图上的列宽 [英] reduce width of columns on a heatmap.2 plot

查看:154
本文介绍了减少heatmap.2图上的列宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个331 * 9的双矩阵(名为expr001).看起来像这样:

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

我正在使用heatmap.2生成一个热图

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")

我得到下面的图:

如何减小列的宽度?有什么建议吗?

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

推荐答案

尝试使用pheatmap程序包.您可以在其中使用参数cellwidthcellheight更方便地控制单元格的大小.即使您的绘图以这种方式变得太大而无法放入绘图窗口,也可以通过使用参数filename将其写入具有正确测量值的文件中.

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.

这篇关于减少heatmap.2图上的列宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆