[R] Newbie graphics question

Russell Norvell RUSSELLNORVELL at utah.gov
Tue Jan 28 23:28:02 CET 2003


Greetings list-

I am a newcomer to R and have tried to resolve my question with the
manuals and the help archives to no avail, though some of this is simply
a lack of familiarity with R and S (BTW I am using R 1.6.1, on Windows98
second edition 4.10.2222A). 

I am trying to create publication quality plots: six figures to a page,
5 cm square plot regions, with 3 cm of horizontal white space and 2 cm
of white space as separators, and 2.5 cm outer (page) margins.  Titles,
tickmarks, and axis labels are to fit into the white space surrounding
each figure.

What I've tried is:

'sixpack <- layout(matrix(c(1,0,2,0,0,0,3,0,4,0,0,0,5,0,6), 5, 3,
byrow=TRUE), widths=lcm(c(5, 3, 5, 5, 3, 5, 5, 3, 5, 5, 3, 5, 5, 3, 5)),
heights=lcm(c(5, 2, 5, 2, 5, 5, 2, 5, 2, 5, 5, 2, 5, 5, 2, 5, 5, 2, 5)),
TRUE)'
'layout.show(sixpack)'

What I get is:

'Error in plot.new() : Figure region too large'

However if I keep the (total) space used by the multiple plot within
~17 cm high by ~11.3 cm wide, I can create a plot within each cell (and
I'll figure out how to fix the axis labeling later I suppose).  My
question is this:  how can I control the margins surrounding the
multiple figures in the layout?  I have tried 'par(omi=c(1,1,1,1))'
ahead of the layout command, with no discernable effect (although
'par(mar=c(2,2,0,0)' does nicely control the figure margins).

Any help, or a point to the right resource, would be greatly
appreciated.

-Russ




More information about the R-help mailing list