[R] Multiple figures margin problem

Greg Snow Greg.Snow at imail.org
Sat Feb 13 18:36:03 CET 2010


I still have not received a copy of the esp package, so I don't know what exactly you tried, or what the results are.

The following works for me and seems to fit your description, but without code and details of the results and how they differ from what you expect, we can only guess.

x1 <- runif(100, 1, 25)
x2 <- runif(100, 1, 25)
y1 <- rnorm(100, x1)
y2 <- rnorm(100, x2)
y3 <- rnorm(100, x1+x2)


par(mfcol=c(3,2), mar=c(0,0,0,0), oma=c(5,4,1,1)+0.1, xpd=NA)

plot(x1,y1, xaxt='n')
plot(x1,y2, xaxt='n')
plot(x1,y3)
plot(x2,y1, xaxt='n', yaxt='n')
plot(x2,y2, xaxt='n', yaxt='n')
plot(x2,y3, yaxt='n')



you may also want to look at the pairs function or the pairs2 function (TeachingDemos package) for examples of axes in the margins.  In fact you can get similar to the above by 

pairs2( cbind(x1,x2), cbind(y1,y2,y3), gap=0 )





-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.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 mnstn
> Sent: Friday, February 12, 2010 3:27 PM
> To: r-help at r-project.org
> Subject: Re: [R] Multiple figures margin problem
> 
> 
> Hello Greg,
> I tried that and got a similar result. The axes are still hidden. I am
> studying R Intro and Fig2A and 3B in
> http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-
> oma/index.htm
> . They seem to indicate that the "mar" parameter alone controls the
> visibility of axis labels. Am I missing something obvious?
> MoonStone
> --
> View this message in context: http://n4.nabble.com/Multiple-figures-
> margin-problem-tp1490455p1490493.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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