[R] graphical parameters: margins

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 3 09:22:28 CET 2007


In this particular case 'An Introduction to R' has a comprehensive 
description of graphical parameters with figures (as do all good books on 
S/R e.g. MASS4 - since it has the same first author).


On Tue, 2 Jan 2007, Ricardo Rodríguez - Your XEN ICT Team wrote:

> --
> Ricardo Rodríguez
> Your XEN ICT Team
>
>>>> Gavin Simpson<gavin.simpson at ucl.ac.uk> 2/1/2007 17:44 >>>
>
>> Either of these two gives you the answer
>
>> help.search("graphical parameters")
>> RSiteSearch("graphical parameters margin")
>
>> more specifically, read ?par and in particular, the entry for parameter
>> 'mar' and it's relatives.
>
>> You might also need to add the axis label separately from the figure:
>
>> opar <- par(mar = c(5,7,4,2) +0.1)
>> plot(1:10, ann = FALSE) # or plot(1:10, ylab = "")
>> mtext("label", side = 2, line = 6)
>> par(opar)
>
>> 1) opar <- par(mar = c(5,7,4,2) +0.1) creates 7.1 lines on the left of
>> the plot and saves defaults
>> 2) mtext("label", side = 2, line = 6) displays the axis label on line 6
>> to push it away from the plot axis. Repeat for other sides...
>> 3) par(opar) resets to the defaults.
>
>> HTH
>
> Thanks Gavin,
>
> I frequently reach the help page or any other document concerning the 
> doubt, but at least for me it is by no means easy to correctly interpret 
> their contents without the help of more experienced people. I do hope I 
> will catch up ASAP!

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


More information about the R-help mailing list