[R] Help with graphic margin

Greg Snow Greg.Snow at imail.org
Fri Sep 17 22:20:16 CEST 2010


I can't see the graphs (my work has a rather strict policy about "file sharing" websites and apparently imageshack is redlisted).

But try adding outer=TRUE to the axis function calls and see if that fixes the problem.  If not, play with the par(xpd= ) setting.

-- 
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 Filoche
> Sent: Thursday, September 16, 2010 5:55 PM
> To: r-help at r-project.org
> Subject: Re: [R] Help with graphic margin
> 
> 
> Hi there and thank you for reply.
> 
> I have been trying that, using mar to set margin around each plot and
> oma to
> specify bottom space.  However, it wont display the xlab.
> 
> Here's my code :
> 
> pdf(file="/home/persican/Desktop/test.pdf", width = 3.5, height = 5.6,
> pointsize = 8);
> 
> par(mfcol = c(3,1), mar = c(1,1,1,1), oma = c(10,1,1,1));
> 
> plot(x,y, pch = 21, bg = "gray", xaxt = "n", yaxt = "n", ylab =
> "ylab");
> ...
> 
> plot(x,y, pch = 21, bg = "gray", xaxt = "n", yaxt = "n", ylab =
> "ylab");
> ...
> 
> plot(x,y, pch = 21, bg = "gray", xaxt = "n", yaxt = "n", ylab = "ylab",
> xlab
> ="X axis");
> axis(1, tck = 0.02);
> axis(2, tck = 0.02);
> 
> dev.off();
> 
> This produce :
> http://img837.imageshack.us/img837/5397/testpdfpages.jpg
> http://img837.imageshack.us/img837/5397/testpdfpages.jpg
> 
> As we can figure, we dont see the xlab on the last plot.
> 
> With regards,
> Phil
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Help-with-
> graphic-margin-tp2542469p2543136.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