Question: How To Plot A 'Longer' Heatmap Using R?
1
gravatar for jlshi.nudt
5.0 years ago by
jlshi.nudt180
China
jlshi.nudt180 wrote:

Hi, I try to plot a heatmap for 200*40 matrix. But the heatmap function output a figure without clear row label, and the outline of the figure likes square. I try to plot a longer figure perhaps to solve this problem, but I don't know how to do this work.
Anyone can tell me? Thank you.

R heatmap • 7.7k views
ADD COMMENTlink modified 5.0 years ago by umer.zeeshan.ijaz1.7k • written 5.0 years ago by jlshi.nudt180
1

Please post the code you're using to make your heatmap.

ADD REPLYlink written 5.0 years ago by Alex Reynolds27k
3
gravatar for karl.stamm
5.0 years ago by
karl.stamm3.4k
United States
karl.stamm3.4k wrote:

While I disagree that a longer plot will be any clearer; I can answer your technical question.

(in R) The size of the plot is scaled to the "output device" which you can specify by wrapping the plotting code in two new statements.

pdf("filename.pdf",width=24,height=8)
#heatmap()
dev.off()

That will make a 24" wide, 8" tall file that should look nice. Depending on your environment those might be specified as centimeters or inches. Another good one is

png("filename.png",width=2000,height=800)
#heatmap()
dev.off()

That will make a 2000x800 pixel bitmap image.

ADD COMMENTlink written 5.0 years ago by karl.stamm3.4k

That partly solves my problems, thank you.

ADD REPLYlink written 5.0 years ago by jlshi.nudt180
2
gravatar for umer.zeeshan.ijaz
5.0 years ago by
Glasgow, UK
umer.zeeshan.ijaz1.7k wrote:

While it is not directly relevant to drawing longer heatmaps in R, I have been developing alternative tools for heatmap visualisation that you might find useful:

HEAPcloud

Usage: http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/HEAPcloud.pdf

Source Code: http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/HEAPcloud_v0.1.zip

Example: http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/HEAPcloud_v0.1/HEAPcloud.html

PHYLOmap

Usage: http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/PHYLOmap.pdf

Example Datasets: http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/PHYLOmap_example_datasets.zip

PHYLOmap.py: http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/PHYLOmap.py

collateResults.pl: http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/collateResults.pl

Path2Newick.java: http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/Path2Newick.java

Best Wishes, Umer

ADD COMMENTlink written 5.0 years ago by umer.zeeshan.ijaz1.7k
1

(+1) Nice alternatives!

ADD REPLYlink written 5.0 years ago by xb390
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 944 users visited in the last hour