简体   繁体   中英

how to resize heatmap without rescaling?

I am using R version 2.12.1 on Win XP.

I have done a heatmap with dendrogram using the heatmap.2 function.

The heatmap basically looks like I want it to be, but the labels of the columns are cut off.

Ie the textual labels of the columns, although they are not very long (less than 12 characters), do not fit into the window and can not be read entirely.

If I manually resize the graphics window, the entire hetmap is rescaled, so this doesn't help at all.

How can I change the output size so that I can read the labels infull? (final goal is PNG and PDF).

Thanks.

我现在想知道的只是想回答我自己的问题:heatmap.2的参数“ margins”控制着用于边距的空间。

您可以在heatmap中使用margins选项。2 margins=c(10,10)取决于输出格式(例如png将是像素)

You can control this by using the "res" option in any one of jpeg(), bmp(), png()

Example:

bmp(filename = "X", width = 480, height = 480, res=72)
heatmap(...)

Adjust res as needed, lower makes it smaller and vice versa.

如何调整heatmap.2参数中的cexRowcexCol值,即减小字体大小。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM