[R] 49 histograms on one page

Christian Hennig fm3a004 at math.uni-hamburg.de
Mon Feb 21 19:36:31 CET 2005


Hi,

I want to do something like this:

par(mfrow=c(7,7))
for (i in 1:49)
  hist(RATDACOM[SUBJNO==i],breaks=0.5+(0:6),
       main="",xlab="",ylab="",xaxt="n",yaxt="n")

(Don't think about what RATDACOM and SUBJNO are.)

I get an error 
Error in plot.new() : Figure margins too large.

36 histograms with mfrow=c(6,6) work.
But the 36 histograms are then so small that I wonder why 49 do not fit.
It seems that though I have main="",xlab="",ylab="",xaxt="n",yaxt="n" the
area reserved for axes and labels is almost as large as it would be if I
would print a single histogram. The histogram itself only gets the remaining
space, which is very small (I could draw 36*4 histograms of this size on a
single page and the margins between them would still be OK).

So the question is:
How do I tell R to print the essential histogram area without main, labs and
axes large enough that it looks well but small enough that 49 fit on one
page? (If I would draw them by hand, no problem...)

Best,
Christian


***********************************************************************
Christian Hennig
Fachbereich Mathematik-SPST/ZMS, Universitaet Hamburg
hennig at math.uni-hamburg.de, http://www.math.uni-hamburg.de/home/hennig/
>From 1 April 2005: Department of Statistical Science, UCL, London
#######################################################################
ich empfehle www.boag-online.de




More information about the R-help mailing list