This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Heatmap.2

Hi everyone, I am trying to graph a heatmap for my DEGs data but I encountered some errors. This is my code:

heatmap.2(diffGenes, 
          Rowv=as.dendrogram(clustRows), 
          Colv=as.dendrogram(clustColumns),
          RowSideColors=module.color,
          col=myheatcolors, scale='row', labRow=NA,
          density.info="none", trace="none",  
          cexRow=1, cexCol=1, margins=c(8,20))

However, I got the error message:

Error in plot.new() : figure margins too large

Also, for the packages, I am using:

library(tidyverse)
library(gplots)
library(RColorBrewer)

I tried to look it up how to fix it but I couldn't figure out. Please help me out, thank you guys!

heatmap.2 r degs

1 answer

The RStudio plotting window is too small. Save it to a file, either pdf or png and then view it.

Yes, it works now! Thank you!!

A small educational note: if an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they work. This will help future users that might find this post find the right answer.

upvote_bookmark_accept

Log in to answer this question.