[R] Positioning of axis titles

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Aug 20 20:41:51 CEST 2008


On Wed, 20 Aug 2008, Uwe Ligges wrote:

>
>
> Nicky Chorley wrote:
>> Hi,
>> 
>> I have created a plot using filled.contour() and have the problem that
>> one of the axis titles and an axis label are overlapping. I have tried
>> changing par()$mgp (with, e.g. par(mgp=c(4,1,0)) ), but this just
>> makes the title go off the screen. I can't work out how to make the
>> plot take up less space in the window, so I can hopefully change mgp
>> and sort the problem.

To answer:

>> Is changing mgp the only way to position axis titles/labels?

No.  They are plotted by title(), and its help page indicates the argument 
'line'.  (Use R 2.7.2 RC or R-devel to get a fuller description.)

> Increase the margins as well, default is:
>  par("mar"=c(5,4,4,1)+.1)

You will need to do that in any case.

>
> Uwe Ligges
>
>
>> Regards,
>> 
>> Nicky Chorley
>> 
>> ______________________________________________
>> 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.
>

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