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

user3054327 picture user3054327 · Dec 27, 2013 · Viewed 26.1k times · Source

I have to plot 141 histograms in R. I am working with windows 8. then I write:

par(mfcol=c(12,12), oma=c(1,1,0,0))

for(m in 1:141 ){
  x <- precData[[m]]
  hist(x[x != 0],30, xlab=NA, ylab=NA, main=statData$Name[m])
}

But always I get this error: Error in plot.new() : figure margins too large

How can I solve it?? Is there any command for adjusting the size of each histogram??

Thanks.

Answer

Davide Passaretti picture Davide Passaretti · Dec 27, 2013

If it occurs using RStudio, you could try to enlarge your plot window. Sometimes it helps.