[R] Positioning of axis titles

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Aug 20 22:02:46 CEST 2008


On Wed, 20 Aug 2008, Nicky Chorley wrote:

> 2008/8/20 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
>> Increase the margins as well, default is:
>>  par("mar"=c(5,4,4,1)+.1)
>>
>> Uwe Ligges
>>
>
> Thanks very much. One further question: is it possible to change the
> position of only one axis title (since using mgp changes both)?

As I said, use title() directly.  E.g.

par(mar=c(6,4,4,1)+.1)
plot(1:10, xlab="")
title(xlab="x lab title", line=4)

There's also a sneaky way in this case:

plot(1:10, xlab="", sub="x lab title")

-- 
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