[R] Positioning of axis titles

Greg Snow Greg.Snow at imail.org
Wed Aug 20 20:52:11 CEST 2008


A couple of things to try:

Some adjustment can be made by adding whitespace to your label, e.g.:

> plot(1:10, xlab='test')
> plot(1:10, xlab='test\n')
> plot(1:10, xlab='test     \n')

You can set the label to be blank originally (xlab=''), then add it afterwards using title, mtext, or text; but with filled.contour the coordinates after the plot are not the same as those when the plot was created, so you may need to use grconvertX, grconvertY, or updateusr (last from the TeachingDemos package) to get the coordinates/positioning right.

Hope this helps,

--
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 Nicky Chorley
> Sent: Wednesday, August 20, 2008 12:30 PM
> To: Uwe Ligges
> Cc: r-help at r-project.org
> Subject: Re: [R] Positioning of axis titles
>
> 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)?
>
> Thanks again,
>
> 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.
>



More information about the R-help mailing list