That partly solves my problems, thank you.
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.
3 answers
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.
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
(+1) Nice alternatives!
I appreciate that this has been a long time since your question, and may not directly answer your question. But I just developed a Julia-based GUI tool to plot heatmaps based on Python's Seaborn package, just wanted to share it here. Very minimal/no coding is required for this. This is the link:
Log in to answer this question.
Please post the code you're using to make your heatmap.