[R] layout function for several plots

Greg Snow Greg.Snow at intermountainmail.org
Wed Sep 19 20:53:40 CEST 2007


Using ann=F just tells R not to put anything in the margins, it does not reduce the size of the margins.  You need to reduce the margin size using par(mar= ...) with appropriate values.  You can then shrink what goes in the margins rather than not plotting it at all (though that is a good first step to make sure everything else works).

For adding the cross, look at the cnvrt.coords function in the TeachingDemos package, will that do what you want? (look at the examples)

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of marcg
> Sent: Wednesday, September 19, 2007 5:26 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] layout function for several plots
> 
> Dear all
> 
> I try to print 9 plots on a page, arranged as the code shows below.
> 
> nf <- layout(matrix(c(1,0,2,0,0,3,0,4,0,5,0,6,0,0,0,0,7,0,8,9), 10,2))
> layout.show(nf)
> 
> but when I try to plot, an error message Fehler in plot.new() 
> : Grafikränder zu groß appears
> 
> to verify p.e. with 
> 
> plot(runif(10:1)) 
> 
> i tried with plot(runif(10:1), ann=F) to produce more space, 
> but neither.
> 
> The second question: how to place a cross in the middle of 
> the plot to delineate in 4 big fields (containing each 5 plots)
> 
> Thanks a lot
> 
> 
> --
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> --
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 



More information about the R-help mailing list