solved: [R] 49 histograms on one page

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


The first try with mar=c(1,1,1,1) does the job!

Thanks,
Christian

On Mon, 21 Feb 2005, Liaw, Andy wrote:

> You may want to set par(mar, oma) to something small, or start the device
> (which one are you using?) with large enough dimension, or both.
> 
> Andy
> 
> > From: Christian Hennig
> > 
> > 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
> > 
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> > http://www.R-project.org/posting-guide.html
> > 
> > 
> 
> 
> ------------------------------------------------------------------------------
> Notice:  This e-mail message, together with any attachment...{{dropped}}




More information about the R-help mailing list