From ripley at stats.ox.ac.uk  Wed Dec 24 13:39:41 2003
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Wed Dec 24 13:38:27 2003
Subject: [Rd] par(mgp) - unexpected behaviour (PR#6045)
Message-ID: <20031224123941.3D95210425@slim.kubism.ku.dk>

I think this *is* a bug in the sense that it is not as intended.  The code 
takes mgp[2] as an alternative way to specify `line' to axis().
That's not what happens in the S original, and it is not what happens with 
mgp[1] (which is always absolute).  So I've altered it to be consistent 
with S (and at least two people's reading of the documentation).

Sending two bug reports is a bug, though.

On Wed, 24 Dec 2003, Uwe Ligges wrote:

> BoersN@pac.dfo-mpo.gc.ca wrote:
> > 
> > Full_Name: Nicholas Boers
> > Version: 1.8.1
> > OS: Windows XP Home Edition, Debian GNU/Linux 3.0
> > Submission from: (NULL) (24.68.84.10)
> > 
> > mgp[2] specifies the axis labels' margin line relative to that of the axis line
> > (mgp[3]).  The `par' help does not document this behaviour.
> > 
> > The following code demonstrates my observation:
> >   plot.new();
> >   par(mgp = c(3, 2, 1));
> >   box();
> >   title(xlab = "x");
> >   axis(1);
> > 
> > Based on the R documentation, combined with S-PLUS' behaviour, I would expect R
> > to plot the axis labels and title at lines 2 and 3, respectively.  However, it
> > plots both at line 3.
> > 
> > The relevant section of the `par' documentation states:
> >   'mgp' The margin line (in 'mex' units) for the axis title, axis
> >         labels and axis line. The default is 'c(3, 1, 0)'.
> > 
> > Thank-you for your time and considering this bug report.
> 
> 
> The margin line number of axis labels is *relative* to the line number
> of the axis line, hence not a bug (or if a bug, then a too sparse
> documentation of par(mgp)).
> 
> 
> Uwe Ligges
> 
> BTW: Don't submit bug reports twice (already submitted as PR#6045
> before).
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 
> 

-- 
Brian D. Ripley,                  ripley@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


[Rd] par(mgp) - unexpected behaviour (PR#6045)
ripley@stats.ox.ac.uk