Question: Is ggplot2 better than heatmap.2 in R?
2
gravatar for NHEJ
4.9 years ago by
NHEJ320
United States
NHEJ320 wrote:

I have read that "There is no specific heatmap plotting function in ggplot2" on http://learnr.wordpress.com/2010/01/26/ggplot2-quick-heatmap-plotting/ 

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.

heatmap ggplot2 R • 3.9k views
ADD COMMENTlink modified 2.3 years ago by Alex Reynolds28k • written 4.9 years ago by NHEJ320
1
gravatar for Devon Ryan
4.9 years ago by
Devon Ryan91k
Freiburg, Germany
Devon Ryan91k wrote:

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.

ADD COMMENTlink written 4.9 years ago by Devon Ryan91k

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 REPLYlink written 4.9 years ago by NHEJ320
1
gravatar for Alex Reynolds
2.3 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

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.

ADD COMMENTlink written 2.3 years ago by Alex Reynolds28k

You mean something like this? https://blog.rstudio.org/2015/06/24/d3heatmap/

ADD REPLYlink written 2.3 years ago by Jake Warner730

Something like that, but not limited to an R session.

ADD REPLYlink written 2.3 years ago by Alex Reynolds28k
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: 631 users visited in the last hour