I usually use heatmap.2 in my work after loading in the required gplots package, but I am wondering if ggplots2 is more powerful to use (or the same, or worse than heatmap.2)...
Also, a heatmap.3 option came out not too long ago, but from first inspection I couldn't find anything that heatmap.3 could do that heatmap.2 couldn't. I am probably wrong though. Any input on this issue is appreciated.
The only big benefit to using ggplot2 is if you already have your data formatted for it (e.g., you're using ggplot2 elsewhere in a given workflow). Otherwise, it's often simpler to just use heatmap.2 on a matrix. I suppose you can prettify a ggplot2 heatmap a bit more, but whether that constitutes "better" or not will be really situation dependent.
So the only advantage to ggplot2 over heatmap.2 in terms of making a nice looking heatmap is if you're already using ggplot2 somewhere else in your R script? This would make sense from a code reuse statement and keeping things as simple as possible.
ADD REPLY
• link
updated 2.9 years ago by
Ram
44k
•
written 10.3 years ago by
NHEJ
▴
360
I'm interested in integrating ggplot2 with d3.js and gridSVG, so as to make interactive web-based figures without relying on a third-party, which I can easily export to publication-quality PDFs. I could see that as a major long-term benefit over heatmap.2.
So the only advantage to ggplot2 over heatmap.2 in terms of making a nice looking heatmap is if you're already using ggplot2 somewhere else in your R script? This would make sense from a code reuse statement and keeping things as simple as possible.