Re: [R] Fancy Page layout

From: Jim Lemon <>
Date: Tue, 01 Jun 2010 21:53:46 +1000

On 06/01/2010 04:16 AM, Noah Silverman wrote:
> Hi,
> Working on a report that is going to have a large number of graphs and
> summaries. We have 80 "groups" with 20 variables each.
> Ideally, I'd like to produce ONE page for each group. It would have two
> columns of 10 graphs and then the 5 number summary of the variables at
> the bottom.
> So, perhaps the top 2/3 of the page has the graphs and the bottom third
> has 20 rows of data summary(maybe a table of sorts.)
> This COULD be done in Latex, but would have to be hand coded for each of
> the 80 groups which would be painfully slow.
> I can easily do the graphs with par(mfrow=c(5,2)) band then draw the
> graphs in a loop.
> But I am stuck from here:
> 1) How do I control the size of the plot window. (Ideally, it should
> print to fill an 8.5 x 11 piece of paper)
> 2) Is there a way to "easily" insert a 5 number summary (summary
> command) into the lower half of the page.
> Does anybody have any ideas??
Hi Noah,
One easy way is to leave some space at the bottom, either by using:


or the more flexible "layout" function, and then use "text" or a fancier function (textbox, boxed.labels, addtable2plot, etc.) to add your text after:


allows you to display the text anywhere you please. If you use a bitmap graphics device, make it big:


so that it won't look lumpy on the printed page.

Jim mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 01 Jun 2010 - 11:51:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 Jun 2010 - 17:30:26 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive